Preserved Topic: Removing some characters from a string |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Berlin (almost) |
posted 06-09-2002 22:26
Hi everyone, |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 06-09-2002 22:32
The parseInt function does this nicely. It takes a string as an argument, and looks for numbers in the beginning of the string. It takes all the numbers up to either the end of the string or the first non-number character, and returns them as a number. |
Bipolar (III) Inmate From: Berlin (almost) |
posted 06-09-2002 23:18
Thanks a lot, Slime, that's exactly what I was looking for! |