9652b0c74968cfc95e83a4d15628ec59f82b6e16
[platform/framework/web/crosswalk-tizen.git] /
1 var toString = require('../lang/toString');
2 var WHITE_SPACES = require('./WHITE_SPACES');
3 var ltrim = require('./ltrim');
4 var rtrim = require('./rtrim');
5     /**
6      * Remove white-spaces from beginning and end of string.
7      */
8     function trim(str, chars) {
9         str = toString(str);
10         chars = chars || WHITE_SPACES;
11         return ltrim(rtrim(str, chars), chars);
12     }
13
14     module.exports = trim;
15