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);
    }