Created
June 12, 2021 19:22
-
-
Save TheArmagan/b431c93832c17790b176a681058ab979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function split(inputString, separateWith) | |
if separateWith == nil then | |
separateWith = ", " | |
end | |
local t={} | |
for str in string.gmatch(inputString, "([^"..separateWith.."]+)") do | |
table.insert(t, str) | |
end | |
return t | |
end | |
function join(inputTable, joinWith) | |
if joinWith == nil then | |
joinWith = ", " | |
end | |
return table.concat(inputTable, joinWith) | |
end | |
function repeatString(inputString, times) | |
if times == nil then | |
times = 1 | |
end | |
local t = "" | |
for i = 1, times do | |
t = t..inputString | |
end | |
return t | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment