I want to learn the best/simplest way to turn a string into another string but with only a subset, starting at the beginning and going to the last index of a character.
I would do it using a subscript (s[start..):
s[start..):
let s = "www.stackoverflow.com" let start = s.startIndex let end = s.index(s.endIndex, offsetBy: -4) let substring = s[start..