Version: 3.2.5
PHP: 8.0.12
Bug Description
Calling method Strings::indexOf() with parameter $haystack being empty string and negative parameter $nth will end with ValueError "strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)".
Steps To Reproduce
Execute following code
$position = \Nette\Utils\Strings::indexOf( '', 'a', -1 );
var_dump( $position );
ValueError is thrown
Expected Behavior
Variable $position contains NULL.