A string is zero or more characters put together. A character is anything that you can type, such as a letter, a digit, a symbol, or a space. Strings are used to hold any kind of text information.
// empty string display "" // a string containing 16 characters display "This is a string." // a string containing one double quote display "\\""
display "This is a string "
"made from separate strings."
The above code displays:
This is a string made from separate strings.
| Escape code | Unicode | Description |
|---|---|---|
| \t | 0009 | Horizontal tab (HT) |
| \n | 000a | Newline or line feed (LF) |
| \f | 000c | Form feed (FF) |
| \r | 000d | Carriage return (CR) |
| \' | 0027 | Single quote |
| \" | 0022 | Double quote |
| \\ | 005c | Backslash |
If you know the Unicode code, any character can be specified. You must prefix the four-digit hexadecimal code of the desired character with "\u". For example, the double quote would be expressed as "\u0022".
total as Int total = 200 display "Total is: " + total + " units"
Advanced string pattern matching and manipulation can be done with regular expressions. For further information, please see Regular Expressions.