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

Breadcrumb

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

function Mbstring::mb_detect_order

File

vendor/symfony/polyfill-mbstring/Mbstring.php, line 486

Class

Mbstring
Partial mbstring implementation in PHP, iconv based, UTF-8 centric.

Namespace

Symfony\Polyfill\Mbstring

Code

public static function mb_detect_order($encodingList = null) {
    if (null === $encodingList) {
        return self::$encodingList;
    }
    if (!\is_array($encodingList)) {
        $encodingList = array_map('trim', explode(',', $encodingList));
    }
    $encodingList = array_map('strtoupper', $encodingList);
    foreach ($encodingList as $enc) {
        switch ($enc) {
            default:
                if (strncmp($enc, 'ISO-8859-', 9)) {
                    return false;
                }
            // no break
            case 'ASCII':
            case 'UTF8':
            case 'UTF-8':
        }
    }
    self::$encodingList = $encodingList;
    return true;
}

API Navigation

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