14830String handlinghttp://www.javascriptkit.com/javatutors/string3.shtmlString handling basically means the dissecting and manipulation of a piece of string (not to be confused with string formatting). Some people devote their entire careers to this task, though as JavaScripters, we aren't known to exhibit such loyalty to the topic (or any other, for that matter!). In this tutorial, we'll look at the methods of the String object that deal with string handling, such as looking up a particular substring within a string, splitting it into many, and more.JavaScript > Tips and Tutorials > Text EffectsOct 12, 2006
The String object of JavaScript allows you to perform manipulations on a stored piece of text, such as extracting a substring, searching for the occurrence of a certain character within it etc.
In order to do this, you need the script! This script is basically a little program that sits on your page and performs tricks when you ask it to. It is different from an applet in that it accompanies the HTML page, whereas the applet is its own small object-oriented program.
String handling basically means the dissecting and manipulation of a piece of string (not to be confused with string formatting). Some people devote their entire careers to this task, though as JavaScripters, we aren't known to exhibit such loyalty to the topic (or any other, for that matter!). In this tutorial, we'll look at the methods of the String object that deal with string handling, such as looking up a particular substring within a string, splitting it into many, and more.
The following function is used when you need to format a number to be 2 digits regardless of the value. For example the number in question is "1" but you wish it to be displayed as "01" to maintain layout or number formatting. This is commonly used when formatting a time or date. Adding a leading zero is sometimes referred to as "zero padding".
Regular expressions are a powerful tool for performing pattern matches in Strings in JavaScript. You can perform complex tasks that once required lengthy procedures with just a few lines of code using regular expressions. Regular expressions are implemented in JavaScript in two ways:
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.