function CodePointString::equalsTo
Overrides AbstractString::equalsTo
File
-
vendor/
symfony/ string/ CodePointString.php, line 102
Class
- CodePointString
- Represents a string of Unicode code points encoded as UTF-8.
Namespace
Symfony\Component\StringCode
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 \strlen($string) === \strlen($this->string) && 0 === mb_stripos($this->string, $string, 0, 'UTF-8');
}
return $string === $this->string;
}