|
September 25, 2000 Splitting a String Tips: September 2000
Yehuda Shiran, Ph.D.
|
|
Javascript's String object contains several useful methods which can help ease the pain of string manipulation. One of these methods is the split() function.
The
You will get:
The full syntax for the
Where:
Using the limit parameter you can choose to extract only the first few elements from a string:
and get:
This tip has been contributed by Amos Bannister.
People who read this tip also read these tips: Look for similar tips by subject: |