[swift-evolution] Trial balloon: Ensure that String always contains valid Unicode
javier.api at gmail.com
Sat Dec 19 13:17:22 CST 2015
Right, I totally agree with you, but NSString compatibility would be
let s: NSString
let s2 = s as String // this would have to be a failable cast
On Sat, Dec 19, 2015 at 9:57 AM Guillaume Lessard via swift-evolution <
swift-evolution at swift.org> wrote:
> > On 18 déc. 2015, at 14:47, Paul Cantrell via swift-evolution <
> swift-evolution at swift.org> wrote:
> > I was quite surprised to learn that it’s possible to create Swift
> strings that do not contain things other than valid Unicode characters. Is
> it feasible to guarantee that this cannot happen?
> That would be nice. I’m not sure that CFString or NSString guarantee
> correctness, though. If they don’t, then this could not be.
> Guillaume Lessard
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution