mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 09:56:03 +00:00
Use string.split instead of strsplit
Some users have addons that pollute the global namespace with a version of strsplit that doesn't match Blizzard's spec Closes #31
This commit is contained in:
+2
-1
@@ -101,9 +101,10 @@ mod = math.mod or mod
|
||||
-- characters (bytes) in the string.
|
||||
-- 'subject' [string] String to split.
|
||||
-- return: [list] a list of strings.
|
||||
local stringsplit = _G.string.split
|
||||
function pfUI.api.strsplit(delimiter, subject)
|
||||
if not subject then return nil end
|
||||
return _G.strsplit(delimiter or ":", subject)
|
||||
return stringsplit(delimiter or ":", subject)
|
||||
end
|
||||
|
||||
-- [ isempty ]
|
||||
|
||||
Reference in New Issue
Block a user