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

Breadcrumb

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

function Mbstring::mb_strrchr

File

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

Class

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

Namespace

Symfony\Polyfill\Mbstring

Code

public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) {
    $encoding = self::getEncoding($encoding);
    if ('CP850' === $encoding || 'ASCII' === $encoding) {
        $pos = strrpos($haystack, $needle);
    }
    else {
        $needle = self::mb_substr($needle, 0, 1, $encoding);
        $pos = iconv_strrpos($haystack, $needle, $encoding);
    }
    return self::getSubpart($pos, $part, $haystack, $encoding);
}

API Navigation

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