[swift-evolution] Faster/lower-level external String initialization

品雪 pinxue at gmail.com
Fri Jan 8 23:04:30 CST 2016


Sorry, I didn't get it, are you talking about:

var bytes : [UInt8] = [65, 66, 67, 68, 69, 70];

var s = String.init(bytes: bytes, encoding: NSUTF8StringEncoding)

?

On Sat, Jan 9, 2016 at 8:22 AM, T.J. Usiyan via swift-evolution <
swift-evolution at swift.org> wrote:

> I support this change as well.
>
> TJ
>
> On Fri, Jan 8, 2016 at 6:06 PM, Guillaume Lessard via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>> Complete agreement from me. I would like to see a String constructor from
>> a Sequence of code units.
>> Also, why is String.fromCString() a factory function rather than a
>> fallible constructor?
>>
>> Guillaume Lessard
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>


-- 
Best Regards!

Yang Wu
--------------------------------------------------------
Location: Pudong, Shanghai, China.
EMail    : pinxue at gmail.com
Website: http://www.time2change.mobi http://rockplayer.com
Twitter/Weibo : @pinxue
<http://www.pinxue.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160109/9241adac/attachment.html>


More information about the swift-evolution mailing list