Returns the length in char-sized units of the receiver’s C-string representation in the default C-string encoding.
Mac Catalyst 13.0–13.0Deprecated
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().
Returns the number of bytes required to store the receiver in a given encoding.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.