Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Iconv.php

function Iconv::mapToUtf8

1 call to Iconv::mapToUtf8()
Iconv::iconv in vendor/symfony/polyfill-iconv/Iconv.php

File

vendor/symfony/polyfill-iconv/Iconv.php, line 640

Class

Iconv
iconv implementation in pure PHP, UTF-8 centric.

Namespace

Symfony\Polyfill\Iconv

Code

private static function mapToUtf8(&$result, array $map, $str, $ignore) {
    $len = \strlen($str);
    for ($i = 0; $i < $len; ++$i) {
        if (isset($str[$i + 1], $map[$str[$i] . $str[$i + 1]])) {
            $result .= $map[$str[$i] . $str[++$i]];
        }
        elseif (isset($map[$str[$i]])) {
            $result .= $map[$str[$i]];
        }
        elseif (!$ignore) {
            trigger_error(self::ERROR_ILLEGAL_CHARACTER);
            return false;
        }
    }
    return true;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal