<!-- 
// This file retrieved from the JS-Examples archives
// http://www.js-examples.com
// 100s of free ready to use scripts, tutorials, forums.
// Author: Brock Weaver - 0

// create the prototype on the String object
function string_trim(s)
{
  // skip leading and trailing whitespace
  // and return everything in between

  return s.replace(/^\s*(\b.*\b|)\s*$/, "$1");
}
//-->
