پودمان:TableTools: تفاوت میان نسخه‌ها

۱۲ بایت اضافه‌شده ،  ‏۱۳ اکتبر ۲۰۲۱
بدون خلاصۀ ویرایش
(improved module formatting; improved isArray; added isArrayLike; fixed _deepCopy; and improved defaultKeySort, code by User:Alexiscoutinho)
بدون خلاصۀ ویرایش
خط ۱۱۶: خط ۱۱۶:
local function cleanPattern(s)
local function cleanPattern(s)
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
return mw.ustring.gsub(s, '([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
end
end


کاربر ناشناس