Contents

cStringLength()

Returns the length in char-sized units of the receiver’s C-string representation in the default C-string encoding.

Declaration

func cStringLength() -> Int

Discussion

Raises if the receiver can’t be represented in the default C-string encoding without loss of information. You can also use canBeConverted(to:) to check whether a string can be losslessly converted to the default C-string encoding. If it can’t, use lossyCString() to get a C-string representation with some loss of information, then check its length explicitly using the ANSI function strlen().

See Also

Related Documentation

Deprecated