function AbstractString::endsWith
Parameters
string|string[] $suffix:
7 calls to AbstractString::endsWith()
- AbstractString::ensureEnd in vendor/
symfony/ string/ AbstractString.php - ByteString::endsWith in vendor/
symfony/ string/ ByteString.php - ByteString::endsWith in vendor/
symfony/ string/ ByteString.php - CodePointString::endsWith in vendor/
symfony/ string/ CodePointString.php - CodePointString::endsWith in vendor/
symfony/ string/ CodePointString.php
3 methods override AbstractString::endsWith()
- ByteString::endsWith in vendor/
symfony/ string/ ByteString.php - CodePointString::endsWith in vendor/
symfony/ string/ CodePointString.php - UnicodeString::endsWith in vendor/
symfony/ string/ UnicodeString.php
File
-
vendor/
symfony/ string/ AbstractString.php, line 263
Class
- AbstractString
- Represents a string of abstract characters.
Namespace
Symfony\Component\StringCode
public function endsWith(string|iterable $suffix) : bool {
if (\is_string($suffix)) {
throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
}
foreach ($suffix as $s) {
if ($this->endsWith((string) $s)) {
return true;
}
}
return false;
}