RosettaCodeData/Task/String-length/Objective-C/string-length-4.m

5 lines
178 B
Objective-C

// Return the number of bytes depending on the encoding,
// here explicitly UTF-8
unsigned numberOfBytes =
[@"møøse" lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; // 7