public static strrpos ( string $haystack, string $needle, array $options = [] ) : integer | ||
$haystack | string | The string being checked. |
$needle | string | The string to find in the haystack. |
$options | array | Allows for selecting the adapter to use via the `name` options. Will use the `'default'` adapter by default. |
리턴 | integer | Returns the numeric position of the last occurrence of the needle in the haystack string. If needle is not found, it returns `false`. |
public static function strrpos($haystack, $needle, array $options = array())
{
$defaults = array('name' => 'default');
$options += $defaults;
return static::adapter($options['name'])->strrpos($haystack, $needle);
}
public function testStrrpos() { Multibyte::strrpos('abcab', 'c'); $result = $this->adapter->testStrrposArgs; $expected = array('abcab', 'c'); $this->assertEqual($expected, $result); }