[Javascript] How do I refer to whitespace characters?

Dan Costea costea.dan at ssi-schaefer.ro
Fri Apr 26 17:24:27 CDT 2002


"trim"?  What is trim? who's method? I know the SQL trim (that is clearing
just the spaces from the beginning of the string, not all white spaces), but
not in js...

Can you give us a working example?


Dan.

----- Original Message -----
From: "Cutter Bl" <cutterbl at hotmail.com>
To: <javascript at LaTech.edu>
Sent: Friday, April 26, 2002 5:11 AM
Subject: Re: [Javascript] How do I refer to whitespace characters?


> How about trim(mystring)
>
> Cutter
> http://www.falcon-knives.com
>
> ----Original Message Follows----
> From: "Lau" <lau at goldenweb.com.au>
> Reply-To: javascript at LaTech.edu
> To: <javascript at LaTech.edu>
> Subject: [Javascript] How do I refer to whitespace characters?
> Date: Fri, 26 Apr 2002 15:02:18 +1000
>
> 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
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list