On 29 Sep 2016, at 10:47, John Brownie via swift-users <swift-users@swift.org> 
wrote:

> Or is there a better way that I've missed (highly possible)?

I don’t think there’s anything significantly better.  The other two options I 
can think of:

* use the `UTF8` codec

* use NSString

NSString(bytes: bytes, length: length, encoding: String.Encoding.utf8.rawValue) 
as? String

Honestly, I think bouncing through `Data` is better.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to