Created
February 13, 2018 09:22
-
-
Save anonymous/3f75d1ff9a7c147cc7c87604b7eb05aa to your computer and use it in GitHub Desktop.
Snippet from https://play.nim-lang.org
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
import strutils | |
var s = "abbb" | |
s.removeSuffix('b') | |
assert s == "a" | |
var t = "abbb" | |
t.removeSuffix("b") | |
assert t == "a" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment