4905869dc1825c68c08383559e1cdfbf0439819d
[platform/framework/web/crosswalk-tizen.git] /
1 define(['../lang/toString'], function(toString){
2     /**
3      * Remove non-printable ASCII chars
4      */
5     function removeNonASCII(str){
6         str = toString(str);
7
8         // Matches non-printable ASCII chars -
9         // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
10         return str.replace(/[^\x20-\x7E]/g, '');
11     }
12
13     return removeNonASCII;
14 });