function ByteString::endsWith
Overrides AbstractString::endsWith
File
-
vendor/
symfony/ string/ ByteString.php, line 140
Class
- ByteString
- Represents a binary-safe string of bytes.
Namespace
Symfony\Component\StringCode
public function endsWith(string|iterable|AbstractString $suffix) : bool {
if ($suffix instanceof AbstractString) {
$suffix = $suffix->string;
}
elseif (!\is_string($suffix)) {
return parent::endsWith($suffix);
}
return '' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase);
}