Skip to content

Strings

All strings in QangLang are represented by UTF-8. All strings are interned, making them immutable and immortal for the life of the program.

There is no implicit conversion of strings in QangLang. When using the + operator to concatenate, ensure both values are strings by using the to_string function.

var hello = "Hello";
var space = " ";
var world = "World!";
println(hello + space + world); // "Hello World!"
var name = "Jane Doe";
var age = 25;
println("Name: " + name + ", Age: " + to_string(age)); // "Name: Jane Doe, Age: 25"