[swift-users] NSData vs Data write to string differently?
Shawn Erickson
shawnce at gmail.com
Thu Sep 22 18:04:14 CDT 2016
In general you shouldn't depend on what description returns for classes,
etc. outside of your control unless it is documented (e.g. part of the API
contract). If you want a specific output you should code up something to
format the output as you need.
-Shawn
On Thu, Sep 22, 2016 at 3:33 PM Robert Nikander via swift-users <
swift-users at swift.org> wrote:
> Hi,
>
> I’ve run into a problem when updating to new Swift in Xcode 8. There was
> some NSData in a string like this:
>
> “ … \(data) … “
>
> It changed to type `Data`, and the string went from hexadecimal bytes to
> writing “20 bytes”. I’m doing a quick bug fix app release now. I can’t
> remember if Xcode auto converted this for me. I thought it did. ? Either
> way… seems like they should behave the same here, no?
>
> Rob
>
>
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160922/cc01b8ee/attachment.html>
More information about the swift-users
mailing list