Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
|
|
@ -1,23 +1,21 @@
|
|||
proc rot13 string$ . encodedString$ .
|
||||
encodedString$ = ""
|
||||
for i = 1 to len string$
|
||||
code = strcode substr string$ i 1
|
||||
func$ rot13 str$ .
|
||||
for c$ in strchars str$
|
||||
code = strcode c$
|
||||
if code >= 65 and code <= 90
|
||||
encodedCode = code + 13
|
||||
if encodedCode > 90
|
||||
encodedCode = 64 + encodedCode - 90
|
||||
encCode = code + 13
|
||||
if encCode > 90
|
||||
encCode = 64 + encCode - 90
|
||||
.
|
||||
elif code >= 97 and code <= 122
|
||||
encodedCode = code + 13
|
||||
if encodedCode > 122
|
||||
encodedCode = 96 + encodedCode - 122
|
||||
encCode = code + 13
|
||||
if encCode > 122
|
||||
encCode = 96 + encCode - 122
|
||||
.
|
||||
else
|
||||
encodedCode = code
|
||||
encCode = code
|
||||
.
|
||||
encodedString$ &= strchar encodedCode
|
||||
encStr$ &= strchar encCode
|
||||
.
|
||||
return encStr$
|
||||
.
|
||||
#
|
||||
call rot13 "Rosetta Code" result$
|
||||
print result$
|
||||
print rot13 "Rosetta Code"
|
||||
|
|
|
|||
1
Task/Rot-13/Raku/rot-13-2.raku
Normal file
1
Task/Rot-13/Raku/rot-13-2.raku
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ raku -pe '.=trans: {$_ => $_».rotate(13)}({[$_».uc, @$_]}("a".."z"))'
|
||||
Loading…
Add table
Add a link
Reference in a new issue