terralang / terra

Terra is a low-level system programming language that is embedded in and meta-programmed by the Lua programming language.
terralang.org
Other
2.73k stars 203 forks source link

Question: String concatenation #674

Closed rzuckerm closed 1 month ago

rzuckerm commented 1 month ago

I've looked through the documentation, but I cannot figure out how to do string concatenation in a terra function. How is this done?

elliottslaughter commented 1 month ago

Terra strings are just C strings. You could use any C library function, such as strncat, to concatenate them. Or there may be other C libraries with nicer ergonomics, but it would be up to you to find them.