Instance Property


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


var length: Int { get }


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 Symbols

func lengthOfBytes(using: UInt)

Returns the number of bytes required to store the receiver in a given encoding.

func size(attributes: [String : Any]? = nil)

Returns the bounding box size the receiver occupies when drawn with the given attributes.