--[=[
	Removes a postfix from a string if it exists
	@param str string
	@param postfix string
	@return string
]=]

function String.removePostfix(str: string, postfix: string): string
	if str:sub(-#postfix) == postfix then
		return str:sub(1, -#(postfix) - 1)
	else
		return str
	end
end
