Created
November 10, 2013 07:00
-
-
Save rahatarmanahmed/7394814 to your computer and use it in GitHub Desktop.
A function that converts text to fullwidth unicode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fancyUnicode = function (a) { | |
return String.fromCharCode.apply(this, a.split('').map(function (b) { | |
return (b===' ') ? 12288 : ((b.charCodeAt(0) > 32 && b.charCodeAt(0) < 127) ? b.charCodeAt(0) + 65248 : b); | |
})); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment