Instance Property

length

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

Declaration

@property(readonly) NSUInteger length;

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

Getting a String’s Length

- lengthOfBytesUsingEncoding:

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

- maximumLengthOfBytesUsingEncoding:

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