// Removes leading white spaces
function LTrim( value ){
var re = /\s*((\S+\s*)*)/;
return value.replace(re, "$1");
}
// Removes ending white spaces
function RTrim( value ) {
var re = /((\s*\S+)*)\s*/;
return value.replace(re, "$1");
}
// Removes leading and ending white spaces
function trim( value ){
return LTrim(RTrim(value));
}
Subscribe to:
Post Comments (Atom)
0 comments for this post