chore: merge

This commit is contained in:
Ibrahima G. Coulibaly
2025-03-07 22:19:49 +00:00
parent ac98878349
commit 2dc78e7392
13 changed files with 29 additions and 27 deletions

View File

@@ -0,0 +1,7 @@
export function rot13(input: string): string {
return input.replace(/[a-zA-Z]/g, (char) => {
const charCode = char.charCodeAt(0);
const baseCode = charCode >= 97 ? 97 : 65; // 'a' or 'A'
return String.fromCharCode(((charCode - baseCode + 13) % 26) + baseCode);
});
}