Trim whitespaces from both ends of a string, using Javascript

 

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));
}

Please feel free to use the comments form below if you have any questions or need more explanation on anything.

Tags

javascript,

Popular Searches

php, linux, mysql, ubuntu, mysql mysql, tools, install mysql, gearman, source code, java

more>>

Comments (write a comment):

0 comments so far. Be the first one to leave a comment on this article.

 

Comment