mirror of
https://github.com/joe7575/techpack.git
synced 2024-08-21 13:44:13 +02:00
safer_lua: fixing string.split issue for seperator value = ''
This commit is contained in:
parent
9a3097a3db
commit
b78d62a7c3
@ -58,6 +58,7 @@ local BASE_ENV = {
|
|||||||
sub = string.sub,
|
sub = string.sub,
|
||||||
upper = string.upper,
|
upper = string.upper,
|
||||||
split = function(str, separator, include_empty, max_splits, sep_is_pattern)
|
split = function(str, separator, include_empty, max_splits, sep_is_pattern)
|
||||||
|
if separator == "" then separator = " " end
|
||||||
return safer_lua.Array(unpack(string.split(str, separator, include_empty, max_splits, sep_is_pattern)))
|
return safer_lua.Array(unpack(string.split(str, separator, include_empty, max_splits, sep_is_pattern)))
|
||||||
end,
|
end,
|
||||||
trim = string.trim,
|
trim = string.trim,
|
||||||
|
Loading…
Reference in New Issue
Block a user