RosettaCodeData/Task/String-length/FutureBasic/string-length.basic

18 lines
472 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CFStringRef s
s = @"møøse"
printf @"\"%@\"",s
print @"character length:",len(s)
print @"unicode length:",,len(s,_kLenUnicode)
print @"byte length UTF8:",len(s,_kLenBytesUTF8)
print @"byte length UTF16:",len(s,_kLenBytesUTF16)
print
s = @"𝔘𝔫𝔦𝔠𝔬𝔡𝔢"
printf @"\"%@\"",s
print @"character length:",len(s)
print @"unicode length:",,len(s,_kLenUnicode)
print @"byte length UTF8:",len(s,_kLenBytesUTF8)
print @"byte length UTF16:",len(s,_kLenBytesUTF16)