-
Notifications
You must be signed in to change notification settings - Fork 81
Strings
Paolo Angeli edited this page Oct 20, 2019
·
13 revisions
Strings in Jai are a simple standard array collection of Unicode UTF8 characters.
Strings are not null-terminated like in the C language.
To use Jai strings with external libraries that need null-terminated strings some workarounds are necessary.
To insert into the strings special characters not supported by the editor in use are available several special escape sequences.
Esc | Description |
---|---|
\0 | NUL ASCII character for null-terminated strings |
\n | Newline character |
\t | Tab character |
\r | Carriage return character |
\" | Double quotes character |
\\ | Backslash character |
\ennn | Escape sequence |
\xnn | Character code addressed by a hexadecimal value |
\dnnn | Character code addressed by a decimal value |
\unnnn | Character code addressed by Unicode 16 bit hexadecimal value |
\Unnnnnnnn | Character code addressed by Unicode 32 bit hexadecimal value |
Escape sequences are used by the print statement to produce colored output effects on the console.
These documents were verified using Grammarly free browser plugin for Chrome. Please use some spell checker before submitting new content.
- Variables and assignments
- Language data types
- Simple user-defined data types
- Expressions and operators
- Type-casting
- Pointers
- Declarations
- Arguments / Parameters
- Return values
- Overloading / Polymorhism
- Advanced features
- Lambdas
- Arrays
- Strings
- Composition of Structs
- Metaprogramming
- Templates / Generics