Top "Nsstring" questions

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

How to make subscripts and superscripts using NSAttributedString?

I need to make subscripts for chemistry formulas (H2O, Na^2+, etc)? Is this possible to do with NSAttributedString, or …

objective-c nsstring nsattributedstring
What is the best way to initialize NSMutableString object?

If I take a following question. What is the best way to initialize NSMutableString Class? (All instance will be return …

iphone objective-c nsstring nsmutablestring
How to convert "SEL" and "id" to NSString?

id parent; SEL selector; // lot's of code... if ([parent respondsToSelector:selector]) { } else { // This doesn't work: NSString *errorMessage = [NSString stringWithFormat:@"%@ in …

ios objective-c nsstring selector
NSString : easy way to remove UTF-8 accents from a string?

I want to change a sentence, for example: Être ou ne pas être. C'était là-bas. Would become: Etre …

objective-c utf-8 nsstring
Get filename and extension from filepath programmatically cocoa?

I know you can use NSBundle: NSString *filePath = [[NSBundle mainBundle] pathForResource:@"foo" ofType:@"rtf"]; to get the filepath of a …

cocoa nsstring filenames filepath nsbundle
NSRange: range.location != NSNotFound vs. range.length > 0

I'm going through some older code in one of my apps and fixing up the code in areas that could …

ios objective-c nsstring nsrange
How to apply bold and italics to an NSMutableAttributedString range?

I've been trying to apply combinations of NSFontAttributes to NSMutableAttributedString's lately and I simply can't find a thorough explanation on …

ios objective-c nsstring nsmutableattributedstring
xcode cut last characters from string

I am working on a Xcode program and need to cut the last 5 characters from a string. Does anybody know …

xcode string nsstring character cut
How to remove whitespace from right end of NSString?

This removes white space from both ends of a string: NSString *newString = [oldString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; How do I remove …

objective-c nsstring trim strip removing-whitespace
String to Phone Number format on iOS

In my app, I have a string like: "3022513240" I want to convert this like: (302)-251-3240 How can I solve …

ios objective-c nsstring phone-number