Class |
RiTa
|
Name |
addTransform
|
Description |
Registers a new RiScript transform function that may then be used in all RiScript evaluations (including within Grammars) |
Example |
RiTa.addTransform("uc", (s) => s.toUpperCase()); RiTa.evaluate("This.uc() is an acronym.");
|
Parameters |
String | the input |
---|
Function | (optional, if not provided, the transform under the given name will be removed) the function to call, which should accept and return a string |
---|
|
Returns |
|
Related |
See RiScript documentation |
Note |
tmp_note |
Syntax |
RiTa.addTransform(name, function);
|
Constants |
See RiScript documentation Constants
|
Platform |
Java / JavaScript |
|
|