Created
October 1, 2016 01:44
-
-
Save mono0926/ce5664c06369ce71a72e540e7b0632e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String: BidirectionalCollection, RangeReplaceableCollection {} | |
extension String { | |
public mutating func removeFirst(_ n: Int) { | |
characters.removeFirst(n) | |
} | |
public mutating func removeLast(_ n: Int) { | |
characters.removeLast(n) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment