tasks a-s

This commit is contained in:
Ingy döt Net 2013-04-10 23:57:08 -07:00
parent 47bf37c096
commit b83f433714
12433 changed files with 156208 additions and 123 deletions

View 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

View 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

View file

@ -0,0 +1 @@
rot13("nowhere ABJURER")