Top "Nsstring" questions

NSString is the plain-text character-string class in Cocoa and Cocoa Touch.

Check if key exists in NSDictionary is null or not

I did search on how to check if NSDictionary key exists or not and came up with the solution. But …

iphone objective-c nsstring nsdictionary
Extracting a string with substringWithRange: gives "index out of bounds"

When I try to extract a string from a larger string it gives me a range or index out of …

objective-c cocoa nsstring nsrange
Using an NSString in a switch statement

Is it possible to use an NSString in a switch statement? Or is it better to just use if / else …

objective-c nsstring switch-statement
Number of occurrences of a substring in an NSString?

How can I get the number of times an NSString (for example, @"cake") appears in a larger NSString (for example, @"…

objective-c cocoa nsstring substring
URLWithString: returns nil

it may be very easy, but I don't seems to find out why is URLWithString: returning nil here. //localisationName is …

iphone objective-c url nsstring nsurl
How to get the size of a NSString

A "quicky": how can I get the size (width) of a NSString? I'm trying to see if the string width …

iphone objective-c xcode nsstring width
NSPredicate Exact Match with String

I have a NSPredicate like this: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"entity.name CONTAINS %@", myString]; But that will return anything which …

objective-c ios core-data nsstring nspredicate
How to add commas to number every 3 digits in Objective C?

If I have a number int aNum = 2000000 how do I format this so that I can display it as the …

objective-c nsstring
Concatenate number with string in Swift

I need to concatenate a String and Int as below: let myVariable: Int = 8 return "first " + myVariable But it does not …

string nsstring swift
How to create a NSString from a format string like @"xxx=%@, yyy=%@" and a NSArray of objects?

Is there any way to create a new NSString from a format string like @"xxx=%@, yyy=%@" and a NSArray of …

objective-c cocoa nsstring nsarray string-formatting