Contents

init(characters:length:)

Returns an initialized NSString object that contains a given number of characters from a given C array of UTF-16 code units.

Declaration

convenience init(characters: UnsafePointer<unichar>, length: Int)

Parameters

  • characters:

    A C array of UTF-16 code units; the value must not be NULL.

  • length:

    The number of characters to use from characters.

Return Value

An initialized NSString object containing length characters taken from characters. The returned object may be different from the original receiver.

See Also

Creating and Initializing Strings