/** Page: javascript string library
 *
 * Contains string functions.
 *
 * @author      Katherine Carr <kcarr@studiesabroad.com>
 * @copyright   Copyright (c) 2003 by International Studies Abroad Inc.
 * @version     $Id: string.js,v 1.2 2003/12/15 19:57:00 kcarr Exp $
 * @package     Main
 * @subpackage  Javascript
 */

// Method: trim() {{{
/** Method: trim()
 *
 * Trims extra whitespace from the beginning and end of this string.
 *
 * @author      Katherine Carr <kcarr@studiesabroad.com>
 * @access      public
 * @return      string          trimmed string
 */
String.prototype.trim = function() {
    var x = this;
    exp1 = new RegExp("^\s*(.*)");
    exp2 = new RegExp("(.*?)\s*$");
    x = x.replace(exp1, "$1");
    x = x.replace(exp2, "$1");
    return x;
}
// }}}

