tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
3
Task/Rot-13/AppleScript/rot-13-1.applescript
Normal file
3
Task/Rot-13/AppleScript/rot-13-1.applescript
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
to rot13(textString)
|
||||
do shell script "tr a-zA-Z n-za-mN-ZA-M <<<" & quoted form of textString
|
||||
end rot13
|
||||
13
Task/Rot-13/AppleScript/rot-13-2.applescript
Normal file
13
Task/Rot-13/AppleScript/rot-13-2.applescript
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
to rot13(textString)
|
||||
local outChars
|
||||
set outChars to {}
|
||||
repeat with ch in (characters of textString)
|
||||
if (ch >= "a" and ch <= "m") or (ch >= "A" and ch <= "M") then
|
||||
set ch to character id (id of ch + 13)
|
||||
else if (ch >= "n" and ch <= "z") or (ch >= "N" and ch <= "Z") then
|
||||
set ch to character id (id of ch - 13)
|
||||
end
|
||||
set end of outChars to ch
|
||||
end
|
||||
return outChars as text
|
||||
end rot13
|
||||
1
Task/Rot-13/AppleScript/rot-13-3.applescript
Normal file
1
Task/Rot-13/AppleScript/rot-13-3.applescript
Normal file
|
|
@ -0,0 +1 @@
|
|||
rot13("nowhere ABJURER")
|
||||
Loading…
Add table
Add a link
Reference in a new issue