Reference

Class

RiString

Name

replaceFirst

Description Replaces the first instance of 'substitution' with 'replacement'.
Syntax
replaceFirst(substitution, replacement);
Parameters
String or Object (the regex pattern)the pattern
Stringthe replacement
Returns
RiStringthis RiString
Note Global flags on the regular expression argument are ignored
Example
rs = new RiString("Who are you?"); 
rs.replaceFirst("?", "?!"); // Who are you?!
Platform Java / Javascript