If your string is a C-String, then you can use strlen(str).
strlen(str)
If it is a NSString *str, then you can use NSUInteger length = [str length];
NSString *str
NSUInteger length = [str length];
What type is your string?If it's an NSString, you find the length like this:
int len = [myString length];
But it will be different if your string is not an NSString.
Use length method, like this:
NSString *myString = @"Hello World";int myLength = [myString length]; //myLength is now 11