public static function trim($number)
    {
        if (strpos($number, '.') != false) {
            // The number is decimal, strip trailing zeroes.
            // If no digits remain after the decimal point, strip it as well.
            $number = rtrim($number, '0');
            $number = rtrim($number, '.');
        }

        return $number;
    }