it is fail in case when string is empty, because index != s.startIndex is true and when s.index(before: index) it is out of boundary
Topic:
Programming Languages
SubTopic:
Swift
Tags: