
function trim_space (str1) {

    return str1.replace(/^\s+/g, '').replace(/\s+$/g, '');

} // end of the 'trim_space()' function

