How do I get the bytes length of NSString? if myString contains \"hallo\", myString.length will return 5, but how many actual bytes are ta
NSString
myString
myString.length
To get the bytes use
NSData *bytes = [string dataUsingEncoding:NSUTF8StringEncoding];
Then you can check bytes.length
bytes.length
Number of bytes depend on the string encoding