Back

String

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:161
src/main/java/bt7s7k7/treeburst/runtime/Realm.java:160
src/main/java/bt7s7k7/treeburst/runtime/Realm.java:224

Represents a string of characters.



Static Properties

String.fromCharCode

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:382

Overloads:

Returns a string containing a character with the provided character code. The codepage is implementation dependent, but it's probably UTF-16.


Instance Properties

String.prototype.endsWith

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:463

Overloads:

Tests if the string ends with the substring.


String.prototype.getCharCode

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:389

Overloads:

Returns the code for a character in the string. If index is not provided, returns the code for the first character. As always, the index may be negative to index from the end of the string, where -1 is the last character and so on.


String.prototype.k_add

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:292

Overloads:

Concatenates two strings together.


String.prototype.k_at

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:403

Overloads:

Returns the a character from the string at an index. The return value is a string of length 1, containing the selected character. As always, the index may be negative to index from the end of the string, where -1 is the last character and so on.


String.prototype.k_dump

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:308

Overloads:

Formats the string into a textual form, which is surrounded by " characters and all special characters are escaped.


String.prototype.k_mul

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:314

Overloads:

Creates a new string that is the input string repeated n times.


String.prototype.k_string

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:303

Overloads:

Returns the string unchanged.


String.prototype.pad

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:330

Overloads:

If the string is shorter that length, creates a new string that is padded with the fill character (or space character if not provided) to reach the desired length. The string is padded to be right aligned, use String.prototype.padLeft for left alignment.


String.prototype.padLeft

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:356

Overloads:

If the string is shorter that length, creates a new string that is padded with the fill character (or space character if not provided) to reach the desired length. The resulting string is left aligned.


String.prototype.slice

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:418

Overloads:

Gets a section of the string starting at from and ending at to (or the end of the string if not provided). As always, the index may be negative to index from the end of the string, where -1 is the last character and so on.


String.prototype.startsWith

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:442

Overloads:

Tests if the string starts with the substring. If index is provided, the substring is expected at this position. As always, the index may be negative to index from the end of the string, where -1 is the last character and so on.


Inherited Properties

Table.prototype.@k_and

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:471

Inherited from: Table

Overloads:

This object is converted to a Boolean. If the result is true, the other expression is evaluated and the result retuned, otherwise this object is returned.


Table.prototype.@k_coalesce

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:531

Inherited from: Table

Overloads:

If this object is not null or void, it is returned, otherwise the other expression is evaluated and the result retuned.


Table.prototype.@k_else

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:568

Inherited from: Table

Overloads:

If this object is not void, it is returned, otherwise the other expression is evaluated and the result retuned.


Table.prototype.@k_or

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:494

Inherited from: Table

Overloads:

This object is converted to a Boolean. If the result is true this object is retuned, otherwise the other expression is evaluated and the result retuned.


Table.prototype.k_boolean

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:591

Inherited from: Table

Overloads:

This object is converted to a Boolean.


Table.prototype.k_is

src/main/java/bt7s7k7/treeburst/runtime/Realm.java:602

Inherited from: Table

Overloads:

Returns true if this object is equal by reference to the other object. This function returns inconsistent results for objects of type String and Number, and should not be used with them. The intended use is for reference comparisons between compound objects and null or void, without using their overload of the k_eq operator.