Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template cutRight(s: string, charsToCut: int): typed =
- s[0..^(charsToCut + 1)]
- echo cutRight("Hello World", 6)
- #[
- >nim c -r strslice.nim
- Hint: used config file 'C:\Program Files\Nim\config\nim.cfg' [Conf]
- Hint: used config file 'C:\Users\Fredrik\AppData\Roaming\nim.cfg' [Conf]
- Hint: system [Processing]
- Hint: strslice [Processing]
- strslice.nim(4, 14) template/generic instantiation from here
- strslice.nim(2, 8) template/generic instantiation from here
- lib\system.nim(3764, 8) Error: no surrounding array access context for '^'
- ]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement