refactorings

This commit is contained in:
Manuel Simon Hirsig
2016-05-08 18:04:45 +02:00
parent a49bdd8317
commit aec237e162
5 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -341,11 +341,11 @@ function public.split(str, separator)
local start_index, _ = strfind(str, separator, 1, true)
if start_index then
local part = string.sub(str, 1, start_index - 1)
local part = strsub(str, 1, start_index - 1)
tinsert(array, part)
str = string.sub(str, start_index + 1, strlen(str))
str = strsub(str, start_index + 1)
else
local part = string.sub(str, 1, strlen(str))
local part = strsub(str, 1)
tinsert(array, part)
return array
end