1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 1 49 49 49 1 | define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ /** * Remove white-spaces from beginning and end of string. */ function trim(str, chars) { str = toString(str); chars = chars || WHITE_SPACES; return ltrim(rtrim(str, chars), chars); } return trim; }); |