Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,29 @@
----------------------------------------
-- Lower to upper case (ASCII only)
-- @param {string} str
-- @return {string}
----------------------------------------
on toUpper (str)
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
len = str.length
repeat with i = 1 to len
pos = offset(str.char[i], alphabet)
if pos > 0 then put alphabet.char[pos] into char i of str
end repeat
return str
end
----------------------------------------
-- Upper to lower case (ASCII only)
-- @param {string} str
-- @return {string}
----------------------------------------
on toLower (str)
alphabet = "abcdefghijklmnopqrstuvwxyz"
len = str.length
repeat with i = 1 to len
pos = offset(str.char[i], alphabet)
if pos > 0 then put alphabet.char[pos] into char i of str
end repeat
return str
end

View file

@ -0,0 +1,5 @@
put toUpper("alphaBETA")
-- "ALPHABETA"
put toLower("alphaBETA")
-- "alphabeta"