Reference

Class

RiString

Name

insertWord

Description Inserts 'newWord' at 'wordIdx' and shifts each subsequent word accordingly.
Syntax
insertWord(newWord, wordIdx);
Parameters
Stringthe new word to insert
intthe position at which it insert the word
Returns
RiStringthis RiString
Example
rs = new RiString("What did you eat?"); 
rs.insertWord(4, "yesterday"); // What did you eat yesterday?
Platform Java / Javascript