public static function value($str, $round = false)
    {
        if (is_string($str)) {
            $str = strtr($str, '.', '');
            $str = strtr($str, ',', '.');
        }

        $val = floatval($str);

        if ($round !== false) {
            $val = round($val, intval($round));
        }

        return $val;
    }