StringUtils
Source function static texttag.center(vec3 pos, string message, real size) returns texttag
Source
function char(int c) returns char
Source
function char(string s) returns char
Source
function charFromIndex(int index) returns char
Source
function charToIndex(char c) returns int
Source
function createCenteredTexttag(vec3 pos, string message, real size) returns texttag
Source
function string.forEachIn(string delim, ForStringSplitCallback cb)
Source
Custom Function which can split strings and runs callback for each string.
It can run even with no delimiter present (with single element).
Example usage:
"H001,H002".forEachIn(",") ->
doSomething()
function string.getWidth() returns int
Source
Returns the width of the string
function char.getWidth() returns int
Source
function string.isNumber() returns boolean
Source
Checks whether a string is a number or not.
function string.isValidDescription() returns boolean
Source
Checks whether a string is valid in terms of max WC3 string length for various usages (Ability Description, Quest Description,...).
function string.reduce(string reduced) returns string
Source
Replaces consecutive repeats of the same string with a single instance
Turns "strstr" into "str"
function string.reduce() returns string
Source
Replaces consecutive repeats of the whitespace character with a single instance
Turns " " into " "
function string.replaceChars(string charset, string replacementChar) returns string
Source
Replaces all occurences of any character from given charlist by a given replacement string.
function string.split(string splitBy) returns LinkedList
Source
Splits the string by another string
"this..is..an..example" split by the string ".." splits into a list containing four strings ["this", "is", "an", "example"]
function string.toChar() returns char
Source
function int.toChar() returns char
Source
function string.toCharList() returns LinkedList
Source
function char.toInt() returns int
Source
function char.toString() returns string
Source
interface ForStringSplitCallback
Source
function callback(string str)
Source