Last active
March 15, 2016 03:38
-
-
Save nikoloza/da926676fee81bea4533 to your computer and use it in GitHub Desktop.
ROT13 variation for Georgian Alphabet.
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
String.prototype.rot17 = function() { | |
return this.replace(/[ა-ჱ]/g, function(c) { | |
c = c.charCodeAt() + 17; | |
return String.fromCharCode(c <= 4337 ? c : c - 34); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ROT13 variation for Georgian Alphabet.
Actually, in Georgian alphabet there are 33 letters, so I had to add an old letter 'ჱ' (which is not in common use by now) and rotate it by 17 places.
Usage
More examples
For live example see fiddle