Swift’s String structs come with a couple of built-in methods to manipulate the case of strings.
String
Way back, folks in programming languages like C had to manually shuffle strings around with functions, dealing with arrays and null-terminated strings.
Swift makes this easy with a property called lowercased.
lowercased
Before Swift and modern programming, pattern matching was a realm of particular tools and languages like sed, awk, or Perl known for text processing capabilities.
sed
awk
Swift makes it pretty straightforward to work with substrings.
In Swift, you get a string’s length by accessing its count property.
count
Swift makes string interpolation a breeze with the (variableName) syntax.
(variableName)
Swift lets you tackle the quote removal job pretty handily.
We’ve been swapping text in strings since the early days of computing.
Swift native support for regex utilizes the NSRegularExpression class, alongside the String class’s range and replacement methods.
NSRegularExpression