SultanC
  1. Home
  2. Examples
  3. Strings

Strings in "" quotes with escapes, and in «» quotes

strings/text.sn
def main(): int {
    let escaped: string = "a\"b";
    let raw: string = «alpha beta»;
    return length(escaped) + length(raw);
}

Run it

With the interpreter, without compiling:

./build/sultanc run examples/en/strings/text.sn

Or compile it to an executable:

./build/sultanc examples/en/strings/text.sn -o build/example && ./build/example

Source on GitHub   All examples