Stringy\Stringy::indexOfLast PHP Метод

indexOfLast() публичный метод

Returns the index of the last occurrence of $needle in the string, and false if not found. Accepts an optional offset from which to begin the search. Offsets may be negative to count from the last character in the string.
public indexOfLast ( string $needle, integer $offset ) : integer | boolean
$needle string Substring to look for
$offset integer Offset from which to search
Результат integer | boolean The last occurrence's index if found, otherwise false
    public function indexOfLast($needle, $offset = 0)
    {
        return \mb_strrpos($this->str, (string) $needle, (int) $offset, $this->encoding);
    }