public function stringPosition($string, $offset = 0)
{
$string = StdObjectWrapper::toString($string);
if (!$this->isNumber($offset)) {
throw new StringObjectException(StringObjectException::MSG_INVALID_ARG, ['$offset', 'integer']);
}
// we double-cast the $string param to string, because integer is also a string, but in stripos function integer
// can cause unwanted mismatches if it's not strictly casted to string
return stripos($this->val(), (string) $string, $offset);
}