private function removeCurrencySymbol(string $value, string $currency): string
    {
        $locale = \Locale::getDefault();

        if (!isset(self::$patterns[$locale][$currency])) {
            // Initialize the cache, ignore return.
            $this->addCurrencySymbol('123', $currency);
        }

        return preg_replace('#(\s?'.preg_quote(self::$patterns[$locale][$currency][1], '#').'\s?)#u', '', $value);
    }
private function removeCurrencySymbol(string $value, string $currency): string
    {
        $locale = \Locale::getDefault();

        if (!isset(self::$patterns[$locale][$currency])) {
            // Initialize the cache, ignore return.
            $this->addCurrencySymbol('123', $currency);
        }

        return preg_replace('#(\s?'.preg_quote(self::$patterns[$locale][$currency][1], '#').'\s?)#u', '', $value);
    }
private function removeCurrencySymbol ( string $ value , string $ currency ) : string { $ locale = \ Locale :: getDefault ( ) ; if ( ! isset ( self :: $ patterns [ $ locale ] [ $ currency ] ) ) { // Initialize the cache, ignore return. $ this -> addCurrencySymbol ( '123' , $ currency ) ; } return preg_replace ( '#(\s?' . preg_quote ( self :: $ patterns [ $ locale ] [ $ currency ] [ 1 ] , '#' ) . '\s?)#u' , '' , $ value ) ; }
Removes the currency symbol.

ICU cannot format() with currency, as this
produces a number with the `¤` symbol.
And, decimal doesn't include scale when 0.
Removes the currency symbol .