Extends
lithium\core\Adaptable
Finds the position of the _last_ occurrence of a string within a string.
Multibyte enabled version of `strrpos()`.
Not all adapters must support interpreting - thus applying - passed
numeric values as ordinal values of a character. The `Iconv` adapter
doesn't support an offset as `strpos()` does - this constitutes the
lowest common denominator here.
Parameters
- string $haystack The string being checked.
- string $needle The string to find in the haystack.
- array $options Allows for selecting the adapter to use via the `name` options. Will use the `'default'` adapter by default.
Returns
integer Returns the numeric position of the last occurrence of the needle in the haystack string. If needle is not found, it returns `false`.Source
public static function strrpos($haystack, $needle, array $options = array()) {
$defaults = array('name' => 'default');
$options += $defaults;
return static::adapter($options['name'])->strrpos($haystack, $needle);
}