try this sample code : NSString *name = @"abcdefghi" ; int len = [name length]; NSMutableString ...
stackoverflow.com