How to concatenate strings in Nim

You can concatenate (combine) two strings in Nim with the & operator:

let s = "Bob" & "Susan"
echo s

Running this yields:



January 26, 2021 19:01

Maybe another example how to space out the two strings?

let s = "Bob " & "and" & " Susan" echo s

Leave a comment

What color are green eyes? (spam prevention)
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.