public function indexOf($str, $from = 0, $cs = CaseSensitivity::CASE_INSENSITIVE)
    {
        $toSearch = (string)$str;

        switch ($cs) {
            case CaseSensitivity::CASE_INSENSITIVE:
                $pos = stripos($this->text, $toSearch, $from);
                break;
            case CaseSensitivity::CASE_SENSITIVE:
                $pos = strpos($this->text, $toSearch, $from);
                break;
            default:
                throw new MWrongTypeException("\$cs", "CaseSensitivity", $cs);
                break;
        }

        if ($pos === false) {
            return -1;
        }

        return $pos;
    }