--[=[
	Adds commas to a number. Not culture aware.
	@param number string | number
	@param seperator string?
	@return string
]=]

function String.addCommas(number: string | number, seperator: string): string
	if type(number) == "number" then
		number = tostring(number)
	end
	seperator = seperator or ","

	local index = -1

	while index ~= 0 do
		number, index = string.gsub(number, "^(-?%d+)(%d%d%d)", "%1" .. seperator .. "%2")
	end

	return number
end

return String
