Javascript examples for Number Operation:Integer
Convert double byte integer to single byte
<html> <head></head> <body> <script> (function() {//from w ww . j a v a 2s . c o m var rex = /[\uFF10-\uFF19]/g; var str = "my value"; console.log("Before: " + str); str = str.replace(rex, function(ch) { return String.fromCharCode(ch.charCodeAt(0) - 65248); }); console.log("After: " + str); })(); </script> </body> </html>