a port of the Processing Visualization Language
Class String
Name

substring()

Examples
String str1 = "CCCP"; 
String str2 = "Rabbit"; 
String ss1 = str1.substring(2);     // Returns "CP"
String ss2 = str2.substring(3);     // Returns "bit"
String ss3 = str1.substring(0, 2);  // Returns "CC"
println(ss1 + ":" + ss2 + ":" + ss3);  // Prints 'CP:bit:CC'
Description Returns a new string that is a part of the original string. When using the endIndex parameter, the string between beginIndex and endIndex-1 is returned.
Syntax
str.indexOf(beginIndex)

str.indexOf(beginIndex,endIndex)
Parameters
str String: any variable of type String
beginIndex int: position from which to begin (inclusive)
endIndex int: position from which to end (exclusive)
Returns String
Usage Web & Application

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub