We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85be0e6 commit ecd9142Copy full SHA for ecd9142
Source/String.swift
@@ -232,15 +232,15 @@ public struct SwiftString /*: Streamable*/ {
232
return SwiftString.UTF8View(string: nativeStringValue)
233
}
234
235
- public var utf8CString: [UTF8Char] {
+ public var utf8CString: UTF8Char[] {
236
#if CLR
237
let result = System.Text.Encoding.UTF8.GetBytes(nativeStringValue)
238
#elseif ISLAND
239
let result = RemObjects.Elements.System.Encoding.UTF8.GetBytes(nativeStringValue, false)
240
#elseif COCOA
241
let utf8 = nativeStringValue.cStringUsingEncoding(.UTF8StringEncoding)
242
let len = strlen(utf8) + 1
243
- let result = [UTF8Char](len)
+ let result = UTF8Char[](len)
244
memcpy(result, utf8, len)
245
#endif
246
return result
0 commit comments