Contents

count

The number of characters in a string.

Declaration

var count: Int { get }

Discussion

To check whether a string is empty, use its isEmpty property instead of comparing count to zero.

See Also

Inspecting a String