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