Contents

length

The number of UTF-16 code units in the receiver.

Declaration

var length: Int { get }

Discussion

This number includes the individual characters of composed character sequences, so you cannot use this property to determine if a string will be visible when printed or how long it will appear.

See Also

Related Documentation

Getting a String’s Length