Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger

Class

String

Name

substring()

Examples
Satz str1 = "CCCP"; 
Satz str2 = "Rabbit"; 
Satz ss1 = str1.substring(2);     // Returns "CP"
Satz ss2 = str2.substring(3);     // Returns "bit"
Satz ss3 = str1.substring(0, 2);  // Returns "CC"
schrib_uf_e_neui_Linie(ss1 + ":" + ss2 + ":" + ss3);  // Prints 'CP:bit:CC'
Description Returns a neus string that is a part of the original string. When using the endIndex parameter, the string between beginIndex and endIndex-1 is returned.
Syntax
substring(beginIndex)
substring(beginIndex, endIndex)
Parameters
beginIndex Ganzizahl: position from which to begin (inclusive)
endIndex Ganzizahl: position from which to end (exclusive)
Usage Web & Application
Stefan Baltensperger 2009

Creative Commons License