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

Breadcrumb

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

function AbstractString::equalsTo

Parameters

string|string[] $string:

6 calls to AbstractString::equalsTo()
ByteString::equalsTo in vendor/symfony/string/ByteString.php
ByteString::equalsTo in vendor/symfony/string/ByteString.php
CodePointString::equalsTo in vendor/symfony/string/CodePointString.php
CodePointString::equalsTo in vendor/symfony/string/CodePointString.php
UnicodeString::equalsTo in vendor/symfony/string/UnicodeString.php

... See full list

3 methods override AbstractString::equalsTo()
ByteString::equalsTo in vendor/symfony/string/ByteString.php
CodePointString::equalsTo in vendor/symfony/string/CodePointString.php
UnicodeString::equalsTo in vendor/symfony/string/UnicodeString.php

File

vendor/symfony/string/AbstractString.php, line 312

Class

AbstractString
Represents a string of abstract characters.

Namespace

Symfony\Component\String

Code

public function equalsTo(string|iterable $string) : bool {
    if (\is_string($string)) {
        throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
    }
    foreach ($string as $s) {
        if ($this->equalsTo((string) $s)) {
            return true;
        }
    }
    return false;
}

API Navigation

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