Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Creating habits v2, Lua (WIP)
--[[ Creating habits v2, Lua This program will attempt to list letters in alphebetical order (Practicing commenting & consistentcy) ]]-- local letters = "abcdefghijklmnopqrstuvwxyz" -- List of letters in alphebetic order -- local function mainFunc(input) local str = "" -- We will store the input letters in order using str -- for i = 1, #input do -- Goes through the input letters -- if string.sub(input, i, i) == string.find(letters, string.sub(input, i, i)) then str = str.. string.sub(input, i, i) end end print(str) -- Prints the end result -- end mainFunc("acdbA") -- Runs the function -- Letters inside is what the function tries to order --
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Security keygen
PAID HACK PuBG
Percentage Calculator (Subscribe to Madflag19)
Uppercase
test123
Map generator
anti.lua
Replace all substring in string
Roots without the math library in Lua
Lua Timer
Please log in to post a comment.