Node.js examples for String:Case
Convert String to Katakana Case
String.prototype.toKatakanaCase = function() { var c, i = this.length, a = []; while(i--)// ww w .j a v a2s . c om { c = this.charCodeAt(i); a[i] = (0x3041 <= c && c <= 0x3096) ? c + 0x0060 : c; }; return String.fromCharCode.apply(null, a); };