Comment on Swift BlogparentComments−mythz12yYou can add your own operator overloading of different number types to mitigate the casting required see: https://github.com/jquave/EasyCastYou can also add your own String extension for length and index character at in a String with: extension String { var length: Int { return countElements(self) } subscript (i: Int) -> String { return String(Array(self)[i]) } } Which will now let you use `.length` on strings, e.g: "Cat".length; //3 And get the character at index with: "Cat"[1]; //a I've more useful extensions at: https://github.com/mythz/swift-linq-examples/blob/master/src...Which enables LINQ-like querying in Swift: https://github.com/mythz/swift-linq-examples
Comments
You can add your own operator overloading of different number types to mitigate the casting required see: https://github.com/jquave/EasyCast
You can also add your own String extension for length and index character at in a String with:
Which will now let you use `.length` on strings, e.g: And get the character at index with: I've more useful extensions at: https://github.com/mythz/swift-linq-examples/blob/master/src...Which enables LINQ-like querying in Swift: https://github.com/mythz/swift-linq-examples