Hi , I am struggling here and maybe someone knows how to do it.
Example:
test.exe a b c
required string output from program : b c
Tried without success:
let test = paramStr(1) echo test
let test = paramStr(2-) # ? let test = paramStr(2:...) # ?
Any advice appreciated. Thank you very much.
Just in case you need an elegant syntax for slices, use BackwardsIndex '^':
import std/cmdline
echo commandLineParams()[1..^1] # '^1' is a shorthand for (list.length - 1)
# test.exe a b c
# @["b", "c"]