Strings - Manhunter07/MFL GitHub Wiki

See also: Type constructors#string

Strings are concatenated (ordered lists of) characters. All strings are Unicode-encoded and run on platform-default multi-byte chars. Strings can have any length and support all printable and non-printable characters. They are internally represented as null-terminated UTF-16 character string. Like numbers or references, strings belong to the group of core data types and can be directly written in source code.

Literals

String literals are static (unnamed) string constants. They are enclosed by double quotes (") and may contain any printable characters.

Special characters

  • Double-quote characters can be inserted by an escape sequence using two double quotes after one another: "". A string consisting of only a double quote would therefore require four contiguous double-quote characters in code ("""").
  • Non-printable characters cannot be notated in string literals, they require an expression to be inserted. They can be added by concatenation and using the Char constructor.

Operators

See also: Operators#Strings