227
edits
Line 206: | Line 206: | ||
=== Predefined Functions === | === Predefined Functions === | ||
* NUM $max(NUM, NUM) - Both NUMs need to be numerical string. Returns the greater NUM | * NUM $min/max(NUM, NUM) - Both NUMs need to be numerical string. Returns the smaller/greater NUM | ||
* NUM $len(STR) - Returns a numerical string represinting the character count of STR | * NUM $len(STR) - Returns a numerical string represinting the character count of STR | ||
* STR $pad(STR, NUM, CHAR) - STR: String to be padded; NUM min string length; CHAR: The character used to pad the string | * STR $pad(STR, NUM, CHAR) - STR: String to be padded; NUM min string length; CHAR: The character used to pad the string | ||
* STR $repl(SRC, REGEX, REPL) - SRC: Source; REGEX: Regex used to match; REPL: replaces every match with REPL | * STR $repl(SRC, REGEX, REPL) - SRC: Source; REGEX: Regex used to match; REPL: replaces every match with REPL | ||
* STR $match(STR, REGEX) STR: Source; REGEX: Match; Returns "1" if STR has a match for REGEX, otherwise unwatched and "" | * STR $match(STR, REGEX) STR: Source; REGEX: Match; Returns "1" if STR has a match for REGEX, otherwise unwatched and "" | ||
* STR $uc/lc(STR) Convert string to uppercase/lowercase | |||
* NUM $add/sub/mul/div(NUM, NUM) Add/Substract/Multiply/Divide two numerical strings | |||
* STR $substr(STR, NUM[, NUM]) Returns the substring beginning from seconds param index to end or optionally to the third param index | |||
* NUM $[l]indexof(STR, STR) Returns the first/last index of the substring specified in the second param in the first param string, -1 if there are no occurrences. | |||
More predefined functions will be added on request. | More predefined functions will be added on request. |
edits