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

Breadcrumb

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

function ByteString::equalsTo

Overrides AbstractString::equalsTo

File

vendor/symfony/string/ByteString.php, line 151

Class

ByteString
Represents a binary-safe string of bytes.

Namespace

Symfony\Component\String

Code

public function equalsTo(string|iterable|AbstractString $string) : bool {
    if ($string instanceof AbstractString) {
        $string = $string->string;
    }
    elseif (!\is_string($string)) {
        return parent::equalsTo($string);
    }
    if ('' !== $string && $this->ignoreCase) {
        return 0 === strcasecmp($string, $this->string);
    }
    return $string === $this->string;
}

API Navigation

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