If your string is a C-String, then you can use strlen(str).
If it is a NSString *str, then you can use NSUInteger length = [str length];
If your string is a C-String, then you can use strlen(str).
If it is a NSString *str, then you can use NSUInteger length = [str length];