JavaScript Trim

JavaScript does not support trim function which VBScript does. Here is the implementation of trim function in JavaScript simply using regular expression. free signals forex

function trim(str) {
   return str.replace(/^\s*|\s*$/g,\"\");
}

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>