max as the maximum length in char-sized units, the receiver’s entire extent as the range, and
NULL for the remaining range.
- iOS 2.0–2.0Deprecated
- macOS 10.0–10.4Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
buffer must be large enough to contain
max chars plus a terminating zero char (which this method adds).
NSCharacter if the receiver can’t be represented in the default C-string encoding without loss of information. Use
can if necessary to check whether a string can be losslessly converted to the default C-string encoding. If it can’t, use
data(using: to get a C-string representation with some loss of information.