Skip to content

Instantly share code, notes, and snippets.

@Varriount
Created January 20, 2014 19:54
Show Gist options
  • Save Varriount/8527795 to your computer and use it in GitHub Desktop.
Save Varriount/8527795 to your computer and use it in GitHub Desktop.
import strutils
when isMainModule:
doAssert split("Hello<world<!!", '<') == @["Hello", "world", "!!"]
doAssert split("Hello<world<", '<') == @["Hello", "world", ""]
doAssert split("<Hello<world<", '<') == @["", "Hello", "world", ""]
doAssert split("Hello<world<!!", {'<'}) == @["Hello", "world", "!!"]
doAssert split("Hello<world<", {'<'}) == @["Hello", "world"]
doAssert split("<Hello<world<", {'<'}) == @["Hello", "world"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment