How can I get the UTF8 bytesize of a string in Swift ?
For example, in Ruby I can do:
str = "hello"
str.bytesize
=> 5
What's the most efficient way to do this in Swift 3 ?
How can I get the UTF8 bytesize of a string in Swift ?
For example, in Ruby I can do:
str = "hello"
str.bytesize
=> 5
What's the most efficient way to do this in Swift 3 ?