Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String.prototype.rot13 = function(){
- return this.replace(/[a-zA-Z]/g, function(c){
- return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement