Get the currency code from ISO.

@param  string  $iso

@return string
515671
public function getCurrency($iso)
    {
        return (bool) $this->config('currencies.included', false)
            ? Currencies::load()->get($iso, $iso)
            : $iso;
    }
542141
public static function getByCode(string $code): ?Currency
    {
        $currencies = Currency::get();

        /** @var Currency $currency */
        $currency = $currencies->where("code", $code)->first();
        return $currency;
    }
395940
protected function assertValidCode($code)
    {
        if ($code instanceof Money) {
            $code = $code->getCurrency();
        }

        if ($code instanceof Currency) {
            return (string) $code;
        }

        if (!is_string($code)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Currency code should be a string; %s given',
                gettype($code)
            ));
        }

        $code = trim(strtoupper($code));
        if (!Currencies::exists($code)) {
            throw new Exception\UnknownCurrencyException(sprintf(
                '%s is not a valid ISO 4217 Currency code',
                $code
            ));
        }

        return $code;
    }
358324
public function getCurrencySign($currency = false)
    {
        $locale = \Locale::getDefault();

        $format = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);
        $pattern = $format->formatCurrency('123', $currency);

        preg_match('/^([^\s\xc2\xa0]*)[\s\xc2\xa0]*123(?:[,.]0+)?[\s\xc2\xa0]*([^\s\xc2\xa0]*)$/u', $pattern, $matches);

        if (!empty($matches[1])) {
            $currency_sign = $matches[1];
        } elseif (!empty($matches[2])) {
            $currency_sign = $matches[2];
        } else {
            $currency_sign = '¤';
        }

        return $currency_sign;
    }
1354599
public function setIsoCode($iso_code) {
        if(!$this->setModified('iso_code', $iso_code)->isModified()) {
            return $this;
        }
		$this->iso_code = $iso_code;
		return $this;
    }
731016
protected function getIdCountryFromCache($iso2Code, $iso3Code)
    {
        if ($iso2Code !== null && isset($this->idCountryCache[$iso2Code])) {
            return $this->idCountryCache[$iso2Code];
        }

        if ($iso3Code !== null && isset($this->idCountryCache[$iso3Code])) {
            return $this->idCountryCache[$iso3Code];
        }

        return false;
    }
102978
public static function getISO4217CurrencyCode($currency) {
    return (array_key_exists($currency, Connect2PayCurrencyHelper::$currencies)) ? Connect2PayCurrencyHelper::$currencies[$currency]["code"] : null;
  }
844195
public static function createFromIso($iso)
    {
        $currency = '([A-Z]{2,3})';
        $ratio = "([0-9]*\.?[0-9]+)"; // @see http://www.regular-expressions.info/floatingpoint.html
        $pattern = '#'.$currency.'/'.$currency.' '.$ratio.'#';

        $matches = [];

        if (!preg_match($pattern, $iso, $matches)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Cannot create currency pair from ISO string "%s", format of string is invalid',
                    $iso
                )
            );
        }

        return new self(new Currency($matches[1]), new Currency($matches[2]), $matches[3]);
    }
513353
function getCurrencySymbol(code, format, locale) {
    if (locale === void 0) { locale = 'en'; }
    var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];
    var symbolNarrow = currency[1 /* SymbolNarrow */];
    if (format === 'narrow' && typeof symbolNarrow === 'string') {
        return symbolNarrow;
    }
    return currency[0 /* Symbol */] || code;
}
1146021
public static function fromCode($val)
    {
        switch(strtolower($val)) {
        case 'dkk':
            return self::DKK;
        case 'eur':
        case 'euro':
            return self::EUR;
        case 'nok':
            return self::NOK;
        case 'sek':
            return self::SEK;
        default:
            return null;
        }
    }
1142925
public static function getCurrencyName($currency) {
    return (array_key_exists($currency, Connect2PayCurrencyHelper::$currencies)) ? Connect2PayCurrencyHelper::$currencies[$currency]["currency"] : null;
  }
261224
public static function getSupportedEncodings()
    {
        if (static::$encodings === null) {
            static::$encodings = array_map('strtoupper', mb_list_encodings());

            // FIXME: Converting € (UTF-8) to ISO-8859-16 gives a wrong result
            $indexIso885916 = array_search('ISO-8859-16', static::$encodings, true);
            if ($indexIso885916 !== false) {
                unset(static::$encodings[$indexIso885916]);
            }
        }

        return static::$encodings;
    }
852822
private function provideCurrency($currencyCode)
    {
        $currency = $this->currencyRepository->findOneBy(['code' => $currencyCode]);
        if (null === $currency) {
            /** @var CurrencyInterface $currency */
            $currency = $this->createCurrency($currencyCode);

            $this->currencyRepository->add($currency);
        }

        return $currency;
    }
1091907
protected function getConversionRate($unit)
    {
        if (!isset(static::$conversionMap[$unit])) {
            throw new \Exception(sprintf(
                'Conversion rate between "%s" and "%s" is not defined.',
                static::$native,
                $unit
            ));
        }
        return static::$conversionMap[$unit];
    }
487196
public static function checkCurrencyAvailabilityByIsoCode($currency_iso_code)
    {
        $available = false;
        if (array_search(strtoupper($currency_iso_code), self::$currencies)) {
            $available = true;
        }
        return $available;
    }
1367875
def get_currencysymbol(self, code):
        """"""
        if not self._symbols:
            symbolpath = os.path.join(self._dir, 'currencies.json')
            with open(symbolpath, encoding='utf8') as df:
                self._symbols = json.load(df)
        return self._symbols.get(code)
275853
private function getValue(array $values, string $currency = null): string
    {
        $currency = !is_null($currency) ? strtolower($currency) : $this->provider->get();

        $values = array_change_key_case($values);

        return $values[$currency];
    }