Logged in as: Guest | Login/Register
 

Trim whitespaces from both ends of a string, using Javascript

Tutorials > Web Development > Javascript > Tips And Tricks > Trim whitespaces from both ends of a string, using Javascript

Discuss this tutorial here | Search www.geeksww.com for more tutorials here

The code below uses the two functions used here and here. Read the tutorials mentioned previously before using the function below:

// Removes leading and ending whitespaces 
// The string to be processed as an argument (value) to the function below.
function trim( value )
{
return LeftTrim(RightTrim(value));
}


 
Discuss this tutorial here | Search www.geeksww.com for more tutorials here
 

Similar Tutorials:

 

Support Geeks Worldwide:

Link to us:

You can support us by putting a link to our website on your blog or website (code is below).

<a href="http://www.geeksww.com/">
Geeks Worldwide - Tutorials about Software Installation,
Configuration, Administration, Monitoring, Tools, Tips &
Tricks
</a>

OR a simple one.

<a href="http://www.geeksww.com/">
Geeks Worldwide - IT related Tutorials
</a>

Feedbacks:

We appreciate feedbacks and suggestions about our tutorials and Geeks Worldwide from readers. Please contact us using the form here and let us know what you think about the tutorial and the website in general.

Bookmark Us:

We are working on new features for the website, please keep visiting or bookmark us using your favourite bookmarking service.

Subscribe to RSS:

You can subscribe to our RSS feed here.

 
Creative Commons License