stringWithCharacters:length:
Returns a string containing a given number of characters taken from a given C array of UTF-16 code units.
Declaration
+ (instancetype) stringWithCharacters:(const unichar *) characters length:(NSUInteger) length;Parameters
- characters:
A C array of UTF-16 code units; the value must not be
NULL. - length:
The number of characters to use from
chars.
Return Value
A string containing length UTF-16 code units taken (starting with the first) from chars.
See Also
Creating and Initializing Strings
stringinit()init(bytes:length:encoding:)init(bytesNoCopy:length:encoding:freeWhenDone:)init(characters:length:)init(charactersNoCopy:length:freeWhenDone:)init(string:)initWithFormat:init(format:arguments:)initWithFormat:locale:init(format:locale:arguments:)init(data:encoding:)stringWithFormat:localizedStringWithFormat:localizedUserNotificationString(forKey:arguments:)