Swift - which types to use? NSString or String

后端 未结 9 1022
死守一世寂寞
死守一世寂寞 2020-12-23 00:06

With the introduction of Swift I\'ve been trying to get my head round the new language

I\'m an iOS developer and would use types such as NSString, NSInteger, N

9条回答
  •  太阳男子
    2020-12-23 00:47

    Swift 4 update

    String gets revisions in swift 4. Now you can directly call count on it and it consider grapheme clusters as 1 piece, like an emoji. NSString is not updated and is counting it in another way.

    var nsstring: NSString = "

提交回复
热议问题