Re:The Decade of Swift
by skohan on Tuesday December 31, 2019 @03:11PM
(#21924307)
It's gotten a bit better, but Swift is still probably not the tool you want to use if you need to do a lot of string manipulation. Swift's string implementation has some interesting properties in terms of memory efficiency and performance, but it still requires fairly the verbose use of string indexes when working with strings rather than simple int offsets. There are good reasons for this, but it's not terribly ergonomic to work with.
FWIW it would probably be fairly easy to implement some String extensions which would give you the kind of API it sounds like you are looking for.
FWIW it would probably be fairly easy to implement some String extensions which would give you the kind of API it sounds like you are looking for.