HELP! * YELLOW=global GREY=local Global HTML version of Foils prepared 21 February 97

Foil 33 Explanation of String methods - I

From Feb 17/19 Delivered Lecture for Course CPS616 -- aJavaScript Language Objects and Frames CPS616 spring 1997 -- Feb 17 and 19 1997. by Geoffrey 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 Fri Feb 21 1997