Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

String

Source

boolean ENABLE_MULTIBYTE_SUPPORT

Source

function string.charAt(int index) returns string

Source

Returns the char at the given position. 0 = first char

function string.contains(string s) returns boolean

Source

True if the string contains the given string

function string.countOccurences(string findStr) returns int

Source

Returns the occurences of a certain string within a string

function string.endsWith(string s) returns boolean

Source

Returns if the given string ends with the specified string.

function string.firstLower() returns string

Source

Returns a new string with first letter is lower

function string.firstUpper() returns string

Source

Returns a new string with first letter is upper

function string.format(vararg string replacements) returns string

Source

Formats the given string replacing {x} delimiters with the passed replacements. Example: "You got {0} gold".format(goldAmount)

function string.getHash() returns int

Source

function string.indexOf(string s) returns int

Source

Returns the index of the specified string inside the given string. If the string does not exist, the returnvalue is -1

function string.indexOf(string s, int startpos) returns int

Source

Returns the index of the specified string inside the given string, starting the search at given startposition. If the string does not exist, the returnvalue is -1

function string.isLower() returns boolean

Source

True when string contains only lowercase letters

function string.isNotBlank() returns boolean

Source

Returns true if this string is non-null and not empty or only consisting of whitespace.

function string.isUpper() returns boolean

Source

True when string contains only uppercase letters

function string.isWhitespace() returns boolean

Source

Returns if the given string is a whitespace (" ",\n,\t,\r)

function string.iterator() returns StringIterator

Source

function string.lastIndexOf(string s) returns int

Source

Returns the last index of the specified string inside the given string, If the string does not exist, the returnvalue is -1

function string.length() returns int

Source

Length of the string

function string.ltrim() returns string

Source

Returns the given string with whitespaces removed from the left end

function string.ltrim(string val) returns string

Source

Removes a string from the beginning of another string

function string.replace(string oldSubstring, string newSubstring) returns string

Source

Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string

function string.rtrim() returns string

Source

Returns the given string with whitespaces removed from the right end

function string.rtrim(string val) returns string

Source

Removes a string from the end of another string

function string.startsWith(string s) returns boolean

Source

Returns if the given string starts with the specified string.

function stringCompare(string s1, string s2) returns int

Source

Returns an integer result based on a lexicographic string comparison of strings s1 and s2.

function string.substring(int start, int stop) returns string

Source

returns a substring specified by end and start position.

function string.substring(int start) returns string

Source

returns a substring specified by end and start position.

function string.toAbilityId() returns int

Source

Converts a string to an ability id

function string.toCharsetInt() returns int

Source

returns the position of the char in the charset therefore converting a single char into an int that can be converted back to a char with .toCharsetString()

function int.toCharsetString() returns string

Source

Converts an int to the representative char

function string.toInt() returns int

Source

Creates an int from a string that only contains numbers (0-9) and a sign

function string.toLines() returns StringLines

Source

Returns a StringLines Object of the given string for iteration

function string.toLowerCase() returns string

Source

Returns the string in lowercase letters

function string.toReal() returns real

Source

Creates a real from a string that only contains numbers (0-9) and a sign

function string.toUpperCase() returns string

Source

Returns the string in uppercase letters

function string.trim() returns string

Source

Returns the given string with whitespaces removed from both ends

function string.trim(string val) returns string

Source

Removes a string from both ends of another string

class StringIterator

Source

int currentpos

Source

string s

Source

int stringLen

Source

function close()

Source

function hasNext() returns boolean

Source

function next() returns string

Source

class StringLines

Source

int currentLine

Source

int lastIndex

Source

int lineCount

Source

string s

Source

function close()

Source

function hasNext() returns boolean

Source

function iterator() returns StringLines

Source

function next() returns string

Source