Trim string - Node.js String

Node.js examples for String:Trim

Description

Trim string

Demo Code


function strTrim(str) {
    var strcatch = String(str);
    return strcatch.replace(/^\s+|\s+$/gm,'');
}

Related Tutorials