Using String Objects in JavaScript

You handle text strings in JavaScript using the String class. This class lets you create objects that can hold text strings, and it provides you with plenty of methods to let you work on those strings. You'll find the JavaScript methods of this class in Table 6-3 and the JScript methods of this class in Table 6-4.

Table 6-3. Methods of the JavaScript String Class
Methods    
anchor big blink bold
charAt charCodeAt concat fixed
fontcolor fontsize indexOf italics
lastIndexOf link match replace
search slice small split
strike sub substr substring
sup toLowerCase toSource toString
toUpperCase valueOf   
Table 6-4. Methods of the JScript String Class
Methods    
anchor big blink bold
charAt charCodeAt concat fixed

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.