NSString in objective c
In this series of Iphone application development tutorials, we going to introduce you with some of the iphone basic classes and objects...that are used in objective C. NSString is one of them.
Brief Introduction to iPhone NSString Class:
NSString is a class which inherits from NSObject(Objective c) and represent the set of character or character strings in frameworks. The purpose of using NSString is declaring the programmatic interface for an objects(that manages immutable strings). The objects later ..can be used anywhere in the same class like c or c++ programming languages.
Note: Immutable string are those strings that can be defined at the time of creating it, which remains unchanged.
NSString and NSMutableString are two different classes. We'll explain it later with the help of example. But before that lets find out the structure of NSString class.
As i said above, NSString inherits from the NSObject which is declared in NSPathUtilities.h, NSString.h & NSURL.h. length and characterAtIndex are two types of primitive methods that are defined in it. Using these two methods, you can easily find out the actual length of string and also you can get the particular character from the Array Index.
Now lets take some example to see how to use NSString and NSMutableString in programming.
List of NSString/NSMutableString Examples:
Recommend the tutorial