nimbase/echo.nim
2019-04-04 19:58:49 +02:00

11 lines
355 B
Nim

import cligen, sequtils
import common
proc main(strings:seq[string], newline=true, nospaces=false) =
if newline:
writeLine(stdout, strings.foldl(a & (if nospaces: "" else: " ") & b))
else:
write(stdout, strings.foldl(a & (if nospaces: "" else: " ") & b))
flushFile(stdout)
dispatch(main, version=("version", nimbaseVersion))