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:

BobSusan

Comments

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 brown eyes? (spam prevention)
Submit
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.