mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-23 04:20:50 +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.
|
-- characters (bytes) in the string.
|
||||||
-- 'subject' [string] String to split.
|
-- 'subject' [string] String to split.
|
||||||
-- return: [list] a list of strings.
|
-- return: [list] a list of strings.
|
||||||
|
local stringsplit = _G.string.split
|
||||||
function pfUI.api.strsplit(delimiter, subject)
|
function pfUI.api.strsplit(delimiter, subject)
|
||||||
if not subject then return nil end
|
if not subject then return nil end
|
||||||
return _G.strsplit(delimiter or ":", subject)
|
return stringsplit(delimiter or ":", subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- [ isempty ]
|
-- [ isempty ]
|
||||||
|
|||||||
Reference in New Issue
Block a user