I\'m trying to test if a Swift string starts or ends with a certain value. These methods do not exist:
var str = \"Hello, playground\" str.startsWith(\"Hello
Prefix and Suffix Equality To check whether a string has a particular string prefix or suffix, call the string’s hasPrefix(:) and hasSuffix(:) methods, both of which take a single argument of type String and return a Boolean value.
Prefix and Suffix Equality
To check whether a string has a particular string prefix or suffix, call the string’s hasPrefix(:) and hasSuffix(:) methods, both of which take a single argument of type String and return a Boolean value.
Apple Doc