Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
|
|
@ -1,6 +1,6 @@
|
|||
function caesar (text, shift) {
|
||||
return text.toUpperCase().replace(/[^A-Z]/g,'').replace(/./g, function(a) {
|
||||
return String.fromCharCode(65+(a.charCodeAt(0)-65+shift)%26);
|
||||
return String.fromCharCode(((a.charCodeAt(0) - 65 + shift) % 26 + 26) % 26 + 65);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ var caesar = (text, shift) => text
|
|||
.toUpperCase()
|
||||
.replace(/[^A-Z]/g, '')
|
||||
.replace(/./g, a =>
|
||||
String.fromCharCode(65 + (a.charCodeAt(0) - 65 + shift) % 26));
|
||||
String.fromCharCode(((a.charCodeAt(0) - 65 + shift) % 26 + 26) % 26 + 65));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue