Modern Substrings in Swift
A Story in Two Acts
This should be easy!
return s[0..<4]
[X] 'subscript(_:)' is unavailable: cannot subscript String with an integer range, use a String.Index range instead.
AAAHHHH DAMN IT HOW DO I DO THIS AGAIN (furiously Stack Overflows)
- Act 2 -
are you serious, is this really the solution
return s[s.startIndex..<s.index(s.startIndex, offsetBy: 4)]
[X] Cannot convert return expression of type 'Substring' to return type 'String'
AAAAAAAAAAAAAAHHHHHHHHHHHHHH