local q={}function q.Add(U,q)q=tostring(q)return#q%3==0 and(((q:reverse()):gsub("\040\037\100\037\100\037\100\041","\037\049\044")):reverse()):sub(2)or((q:reverse()):gsub("\040\037\100\037\100\037\100\041","\037\049\044")):reverse()end function q.Remove(U,q)if tonumber(q)then return q end for U=1,#q,1 do if string.sub(q,U,U)=="\044"then q=string.sub(q,1,U-1)..string.sub(q,U+1,#q)end end return q end return q
-- Commas
-- InstanceName / Kye
-- November 8, 2020

local Commas = {}

function Commas:Add(str)
	str = tostring(str)

	return #str % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2)
		or str:reverse():gsub("(%d%d%d)", "%1,"):reverse()
end

function Commas:Remove(str)
	if tonumber(str) then
		return str
	end

	for a = 1, #str do
		if string.sub(str, a, a) == "," then
			str = string.sub(str, 1, a - 1) .. string.sub(str, a + 1, #str)
		end
	end

	return str
end

return Commas
