amayne / SwiftString

A comprehensive, lightweight string extension for Swift
MIT License
1.62k stars 141 forks source link

subscript #21

Open TimurKhay opened 8 years ago

TimurKhay commented 8 years ago
2016-06-11 9 51 58

does SwiftString's subscript work this way intentionally?

MaximusMcCann commented 8 years ago

Would expect it to grab chars 4 through 8 in the below case. currently: "abcdefgh"[4..<8] -> "" // blank string expected example: "abcdefgh"[4..<8] -> "efgh"

Pull request: https://github.com/amayne/SwiftString/pull/22