Guest User

strslice.nim

a guest
Jun 28th, 2017
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. template cutRight(s: string, charsToCut: Natural): string =
  2.     s[0 .. ^(charsToCut + 1)]
  3.  
  4. template cutLeft(s: string, charsToCut: Natural): string =
  5.     s[charsToCut .. ^1]
  6.  
  7. template cutLeftRight(s: string, left, right: Natural): string =
  8.     s[left .. ^(right + 1)]
Advertisement
Add Comment
Please, Sign In to add comment