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()
public class StringIterator
Members:
construct(string s, int currentpos, int stringLen)hasNext() returns booleannext() returns stringclose()public class StringLines
Members:
construct(string s, int lastIndex, int lineCount)iterator() returns thistype ⚠️ Deprecated. class deprecatedhasNext() returns boolean ⚠️ Deprecated. class deprecatednext() returns string ⚠️ Deprecated. class deprecatedclose() ⚠️ Deprecated. class deprecatedpublic function stringCompare(string s1, string s2) returns int
Returns an integer result based on a lexicographic string comparison of strings s1 and s2.
public function string.isNotBlank() returns boolean
Returns true if this string is non-null and not empty or only consisting of whitespace.
public function string.toCharsetInt() returns int
public function string.toReal() returns real
Creates a real from a string that only contains numbers (0-9) and a sign
public function string.toInt() returns int
Creates an int from a string that only contains numbers (0-9) and a sign
public function int.toCharsetString() returns string
Converts an int to the representative char
public function string.substring(int start, int stop) returns string
returns a substring specified by end and start position.
public function string.substring(int start) returns string
returns a substring specified by end and start position.
public function string.length() returns int
Length of the string
public function string.charAt(int index) returns string
Returns the char at the given position. 0 = first char
public function string.toAbilityId() returns int
Converts a string to an ability id
public function string.endsWith(string s) returns boolean
Returns if the given string ends with the specified string.
public function string.startsWith(string s) returns boolean
Returns if the given string starts with the specified string.
public function string.toLowerCase() returns string
Returns the string in lowercase letters
public function string.toUpperCase() returns string
Returns the string in uppercase letters
public function string.isUpper() returns boolean
True when string contains only uppercase letters
public function string.isLower() returns boolean
True when string contains only lowercase letters
public function string.trim() returns string
Returns the given string with whitespaces removed from both ends
public function string.ltrim() returns string
Returns the given string with whitespaces removed from the left end
public function string.rtrim() returns string
Returns the given string with whitespaces removed from the right end
public function string.ltrim(string val) returns string
Removes a string from the beginning of another string
public function string.rtrim(string val) returns string
Removes a string from the end of another string
public function string.trim(string val) returns string
Removes a string from both ends of another string
public function string.indexOf(string s) returns int
Returns the index of the specified string inside the given string. If the string does not exist, the returnvalue is -1
public function string.indexOf(string s, int startpos) returns int
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
public function string.lastIndexOf(string s) returns int
Returns the last index of the specified string inside the given string, If the string does not exist, the returnvalue is -1
public function string.countOccurences(string findStr) returns int
Returns the occurences of a certain string within a string
public function string.contains(string s) returns boolean
True if the string contains the given string
public function string.isWhitespace() returns boolean
Returns if the given string is a whitespace (“ “,\n,\t,\r)
public function string.firstUpper() returns string
Returns a new string with first letter is upper
public function string.firstLower() returns string
Returns a new string with first letter is lower
public function string.replace(string oldSubstring, string newSubstring) returns string
Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string
public function string.getHash() returns int
public function string.format(vararg string replacements) returns string
Formats the given string replacing {x} delimiters with the passed replacements. Example: “You got {0} gold”.format(goldAmount) *
public function string.iterator() returns StringIterator
public function string.toLines() returns StringLines
public constant ENABLE_MULTIBYTE_SUPPORT = false
🔧 Configurable. Override it in your map’s config package.