Is life tough? Is life getting you down? Well this website aims to help Tough Life – life is hard
Category: Strings
Working With Strings
URL Encode A String NSString *UrlEncodedString = MyStringToEncode stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
Displaying Values In Strings
Boolean [NSString stringWithFormat:@”The value is: %d”, MyBool] Char [NSString stringWithFormat:@”The value is: %c”, MyChar] Decimal [NSString stringWithFormat:@”The value is: %d”, MyInt] [NSString stringWithFormat:@”The value is: %06d”, MyInt] //Display as 6 digits with leading zeros as necessary Unsigned Long [NSString stringWithFormat:@”The value is: %lu”, MyUnsignedLong] Long [NSString stringWithFormat:@”The value is: %ld”, MyLong] Long Long [NSString stringWithFormat:@”The […]
Using NSMutableString
Mutable vs. Immutable Strings NSMutableString – Should be used when you are physically changing the value of an existing string, without completely discarding the old value (i.e. adding a character to the beginning or end, modifying a character in the middle etc). NSString – Can never be changed after it has been created, only overwritten […]
String Format Specifiers
http://developer.apple.com/iphone/library/documentation/cocoa/conceptual/Strings/Articles/formatSpecifiers.html
Using NSString
Mutable vs. Immutable Strings NSMutableString – Should be used when you are physically changing the value of an existing string, without completely discarding the old value (i.e. adding a character to the beginning or end, modifying a character in the middle etc). NSString – Can never be changed after it has been created, only overwritten […]