Strings are a plain sequence of alphanumerical characters - letters, numbers or symbols - which are mostly used for messages, or for identifiers of objects such as projects (documents), actions, buffers, programmers (end devices), etc. They are defined this way:

string name = "characters"; 

Defines a string with the given name and initializes it to the content characters between double quotation marks.



string device_name = "device";
string empty_str = "";
string[] MyStringArray;

The string class has the following functions:

string.length(): int

returns the number of characters in the string.

string.toInt(): int

returns the integer number represented by the string.

string.toDouble(): double

returns the double floating point number represented by the string.

Strings can be formatted with the message function and the << pipe operator. The content between %..% is replaced by the pipe in order of appearance, e.g:

message("Variable %p1% has the content %p2%") << "Test" << 12;
// results in the string "Variable Test has the content 12" 

See also:

Variables, structs, functions, print, message


► latest version online