With Swift 2, Apple has changed global functions to protocol extensions, extensions that match any type conforming to a protocol. Thus the new syntax is:
stringName.characters.count
Reference: http://stackoverflow.com/questions/24037711/get-the-length-of-a-string
No comments:
Post a Comment