Text Processing Primitives
Basic
Basic
| Primitive | Description |
|---|---|
| Quote | Operator "x", specifies a text string |
| Add | Operator x+y, numeric or matrix addition |
| substring | Segment of a text string |
| find | Position of a substring in a string |
| findlast | Position of the last occurrence of a substring in a string |
| len | Number of characters in a string |
| asc | ASCII code of a character |
| chr | Character value of an ASCII code |
| substitute | Replaces all occurrences of a substring |
| replace | Replaces a specific occurrence of a substring |
| repeat | String created by repeating a substring a given number of times |
| lower | String with all characters converted to lowercase |
| upper | String with all characters converted to uppercase |
| form | Creates an output form from a list of values |
| eval | Compiles and evaluates a text string |
Conversion
Conversion
| Primitive | Description |
|---|---|
| tostring | Converts a list or number to text |
| tonumber | Number derived from a text string |
| tolist | List created by parsing a string into substrings |
| parse | Parses a node definition into a list of arguments |
| wordwrap | Inserts carriage returns in a text string to wrap text |
| tableform | Table representation of a matrix |
| createhtmltable | HTML table presentation of matrix data |
| parsehtmltable | Parses an HTML table into matrix data |
| htmlencode | Replaces characters &, <, >, and " with HTML codes |
| htmldecode | Replaces HTML codes &, <, >, " with characters |
| escape | Replaces reserved characters in text strings with %nn codes |
| unescape | Replaces %nn codes in text strings with corresponding characters |
| crc32 | Returns the 32-bit CRC value for the given text |
| RGB | Build a RGB color value |