HELP! * GREY=local LOCAL HTML version of Foils prepared 15 January 1997

Foil 41 Explanation of String methods - I

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * Important Information in IMAGE
Secs 66.2 Addon
the String object has one property with actualstring.length recording length in characters of string
Note we only have one type of string object -- Java has String (fixed) and StringBuffer (mutable)
characters are indexed from the left starting at 0 and ending with actualstring.length-1
newstring = actualstring.substring(index1,index2); // returns a string consisting of characters in locations index1 ... index2-1
Peculiarly if index2 < index1, substring returns locations index2 ... index1-1



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat May 24 1997