Reference

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
Stringthe input
Functionthe function to call, which should accept and return a string
Returns void
Syntax
RiTa.addTransform(name, function);
Platform Java / JavaScript