Rot-13: Difference between revisions
Content added Content deleted
(→{{header|Raku}}: add one-liner) |
|||
Line 1,762: | Line 1,762: | ||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |
||
<syntaxhighlight lang="text"> |
<syntaxhighlight lang="text"> |
||
func$ rot13 str$ . |
|||
for c$ in strchars str$ |
|||
encodedString$ = "" |
|||
code = strcode c$ |
|||
code = strcode substr string$ i 1 |
|||
if code >= 65 and code <= 90 |
if code >= 65 and code <= 90 |
||
encCode = code + 13 |
|||
if |
if encCode > 90 |
||
encCode = 64 + encCode - 90 |
|||
. |
. |
||
elif code >= 97 and code <= 122 |
elif code >= 97 and code <= 122 |
||
encCode = code + 13 |
|||
if |
if encCode > 122 |
||
encCode = 96 + encCode - 122 |
|||
. |
. |
||
else |
else |
||
encCode = code |
|||
. |
. |
||
encStr$ &= strchar encCode |
|||
. |
. |
||
return encStr$ |
|||
. |
. |
||
⚫ | |||
# |
|||
⚫ | |||
print result$ |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
{{out}} |
{{out}} |