length—the length of the string in characters
charAt() and charCodeAt()—the methods for returning the character or character code at a certain position in the string
indexOf() and lastIndexOf()—the methods that allow the searching of a string for the existence of another string and return the character position of the string if found
substr() and substring()—the methods that return just a portion of a string
toUpperCase() and toLowerCase()—the methods that return a string converted to upper- or lowercase
In this chapter we'll look at four new methods of the String object, namely split(), match(), replace(), and search(). The last three, in particular, give us some very powerful text manipulation functionality. However, to make full use of this functionality, we need to learn about a slightly more complex subject.
Although split(), match(), replace(), and search() are at their most powerful with regular expressions, they can also be used with just plain text. We'll take a look at how they work in this simpler context first, to familiarize ourselves with the methods.