An index offset by n from the index i, unless that index would be beyond limit in the direction of movement. In that case, the method returns nil.
This won't work for string with count smaller than batch size because of the guard
So this fixes by fallbacks to string.endIndex. Hope the very small potion of iOS 8.1 and 8.2 users will like this 😄
According to
index
functionThis won't work for string with count smaller than batch size because of the guard So this fixes by fallbacks to
string.endIndex
. Hope the very small potion of iOS 8.1 and 8.2 users will like this 😄