Reference

Class

RiString

Name

slice

Description Extracts a part of a string from this RiString
Syntax
slice(begin);
slice(begin, end);
Parameters
intThe index where to begin the extraction. First character is at index 0
int(Optional) Where to end the extraction. If omitted, slice() selects all characters from the begin position to the end of the string
Returns
String
Example
myRiString = new RiString("He ate the apple."); 
myRiString.slice(0,6); // He ate
Platform Java / Javascript