Contents

init(validatingPlatformString:)

Creates a string by interpreting the null-terminated platform string as UTF-8 on Unix and UTF-16 on Windows.

Declaration

init?(validatingPlatformString platformString: UnsafePointer<CInterop.PlatformChar>)

Parameters

  • platformString:

    The null-terminated platform string to be interpreted as CInterop.PlatformUnicodeEncoding.

Discussion

If the contents of the platform string isn’t well-formed Unicode, this initializer returns nil.