Last edit: @kyork in #marvin-dev 2 years ago - Slack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i))
end
local upper = true
for i=1,#list do
  if list[i] ~= " " then
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end end
end
print(table.concat(list)) print("\n") print("https://marvin.riking.org/l/1i")

History

Revision: 1806 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i))
end
local upper = true
for i=1,#list do
  if list[i] ~= " " then
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end end
end
print(table.concat(list)) print("\n") print("https://marvin.riking.org/l/1i")

Revision: 1805 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i))
end
local upper = true
for i=1,#list do
  if list[i] == " " then continue end
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end
end
print(table.concat(list)) print("\n") print("https://marvin.riking.org/l/1i")

Revision: 1804 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i))
end
local upper = true
for i=1,#list do
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end
end
print(table.concat(list)) print("\n") print("https://marvin.riking.org/l/1i")

Revision: 1803 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i))
end
local upper = true
for i=1,#list do
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end
end
return table.concat(list)

Revision: 1802 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i))
end
ptable(list) print("\n")
local upper = true
for i=1,#list do
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end
end
return table.concat(list)

Revision: 1801 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i))
end
ptable(list) print("\n")
local upper = false
for i=1,#list do
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end
end
return table.concat(list)

Revision: 1800 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i+1))
end
ptable(list) print("\n")
local upper = false
for i=1,#list do
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end
end
return table.concat(list)

Revision: 1799 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua}
local input = args
local list = {}
for i=1,#input do
  table.insert(list, string.sub(input, i, i+1))
end
local upper = false
for i=1,#list do
  if upper then
    list[i] = string.upper(list[i])
    upper = false
  else
    list[i] = string.lower(list[i])
    upper = true
  end
end
return table.concat(list)