[Javascript] How do I refer to whitespace characters?

Lau lau at goldenweb.com.au
Fri Apr 26 00:02:18 CDT 2002


I want to read a string and remove all the whitespace before a word.
How do I refer to tabs and newline characters etc.
Can anyone give me a full list of what I should be checking for? 


while(mystr.length>0 && mystr.charAt(0)==" ") 
     mystr= mystr.substr(1);


Peace
Lau




More information about the Javascript mailing list