StringUnit 22 |
|
String objects |
|
A String object has two properties. |
|
Character methods |
|
String objects have several methods that use a character. |
|
Substring methods |
|
String objects have several methods that deal with substrings. |
|
Case and string methods |
|
There are String methods to produce upper or lower case. There are string methods that just return the primitive string. |
|
Strings and Arrays |
|
The String method split() converts a String into an Array. |
|
Regular expressions |
|
The string methods
One of the key techniques for processing strings is to use regular expressions.
Regular expressions are used in JavaScript, Perl, several Unix utilities,
and other environments that process strings.
After you learn regular expressions, I recommend you read about these methods
in Flanagan's book. |
|
Compare |
|
There is a |
|
HTML node methods |
|
This section is optional. It shows some dynamic HTML node methods.
There are some non-standard String methods that will put a string within an HTML element.
They are the following:
Standard methods for managing HTML nodes include:
A very well supported, and very popular non-standard way of managing HTML nodes is to modify the
The standard methods, and modification of innerHTML are shown in the sample. |
|
Reading assignment |
|
Reading assignments are in the text book, Java Script, A Beginner's Guide, Second Edition, by John Pollock; McGraw Hill / Osborne, ISBN 0-07-222790-7
Read Module 13. Alternate reading assignments are in the text book, Java Script Concepts & Techniques Programming Interactive Web Sites, by Tina Spain McDuffie; Franklin, Beedle & Associates, ISBN 1-887902-45-7 Read Chapter 9 Manipulating strings. |
|
Lecture notes |
|
Do NOT read the lecture notes before hearing the lecture. If you do, you will find the lecture very boring. Read the lecture notes if you do not attend the lecture, or if you wish to review the material. |
|