<class name="QStringMatcher" doc="/** <p>The <a href="QStringMatcher.html#QStringMatcher(com.trolltech.qt.core.QStringMatcher)"><tt>QStringMatcher</tt></a> class holds a sequence of characters that can be quickly matched in a Unicode string.</p> <p>This class is useful when you have a sequence of <tt>QChar</tt>s that you want to repeatedly match against some strings (perhaps in a loop), or when you want to search for the same sequence of characters multiple times in the same string. Using a matcher object and <a href="QStringMatcher.html#indexIn(java.lang.String, int)"><tt>indexIn</tt></a> is faster than matching a plain <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a> with QString::indexOf() if repeated matching takes place. This class offers no benefit if you are doing one-off string matches.</p> <p>Create the <a href="QStringMatcher.html#QStringMatcher(com.trolltech.qt.core.QStringMatcher)"><tt>QStringMatcher</tt></a> with the <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a> you want to search for. Then call <a href="QStringMatcher.html#indexIn(java.lang.String, int)"><tt>indexIn</tt></a> on the <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a> that you want to search.</p> @see <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a> @see <a href="QByteArrayMatcher.html"><tt>QByteArrayMatcher</tt></a> @see <a href="QRegExp.html"><tt>QRegExp</tt></a> */"> <method name="public QStringMatcher()" doc="/** <p>Constructs an empty string matcher that won't match anything. Call <a href="QStringMatcher.html#setPattern(java.lang.String)"><tt>setPattern</tt></a> to give it a pattern to match.</p> */"/> <method name="public QStringMatcher(java.lang.String pattern, com.trolltech.qt.core.Qt.CaseSensitivity cs)" doc="/** <p>Constructs a string matcher that will search for <tt>pattern</tt>, with case sensitivity <tt>cs</tt>.</p> <p>Call <a href="QStringMatcher.html#indexIn(java.lang.String, int)"><tt>indexIn</tt></a> to perform a search.</p> */"/> <method name="public QStringMatcher(java.lang.String pattern)" doc="/** <p>Equivalent to <a href="QStringMatcher.html#QStringMatcher(com.trolltech.qt.core.QStringMatcher)"><tt>QStringMatcher</tt></a>(<tt>pattern</tt>, Qt::CaseSensitive). */"/> <method name="public QStringMatcher(com.trolltech.qt.core.QStringMatcher other)" doc="/** <p>Copies the <tt>other</tt> string matcher to this string matcher.</p> */"/> <method name="public final com.trolltech.qt.core.Qt.CaseSensitivity caseSensitivity()" doc="/** <p>Returns the case sensitivity setting for this string matcher.</p> @see <a href="QStringMatcher.html#setCaseSensitivity(com.trolltech.qt.core.Qt.CaseSensitivity)"><tt>setCaseSensitivity</tt></a> */"/> <method name="public final int indexIn(java.lang.String str, int from)" doc="/** <p>Searches the string <tt>str</tt> from character position <tt>from</tt> (default 0, i.e&#x2e; from the first character), for the string <a href="QStringMatcher.html#pattern()"><tt>pattern</tt></a> that was set in the constructor or in the most recent call to <a href="QStringMatcher.html#setPattern(java.lang.String)"><tt>setPattern</tt></a>. Returns the position where the <a href="QStringMatcher.html#pattern()"><tt>pattern</tt></a> matched in <tt>str</tt>, or -1 if no match was found.</p> @see <a href="QStringMatcher.html#setPattern(java.lang.String)"><tt>setPattern</tt></a> @see <a href="QStringMatcher.html#setCaseSensitivity(com.trolltech.qt.core.Qt.CaseSensitivity)"><tt>setCaseSensitivity</tt></a> */"/> <method name="public final int indexIn(java.lang.String str)" doc="/** <p>Equivalent to <a href="QStringMatcher.html#indexIn(java.lang.String, int)"><tt>indexIn</tt></a>(<tt>str</tt>, 0). */"/> <method name="public final java.lang.String pattern()" doc="/** <p>Returns the string pattern that this string matcher will search for.</p> @see <a href="QStringMatcher.html#setPattern(java.lang.String)"><tt>setPattern</tt></a> */"/> <method name="public final void setCaseSensitivity(com.trolltech.qt.core.Qt.CaseSensitivity cs)" doc="/** <p>Sets the case sensitivity setting of this string matcher to <tt>cs</tt>.</p> @see <a href="QStringMatcher.html#caseSensitivity()"><tt>caseSensitivity</tt></a> @see <a href="QStringMatcher.html#setPattern(java.lang.String)"><tt>setPattern</tt></a> @see <a href="QStringMatcher.html#indexIn(java.lang.String, int)"><tt>indexIn</tt></a> */"/> <method name="public final void setPattern(java.lang.String pattern)" doc="/** <p>Sets the string that this string matcher will search for to <tt>pattern</tt>.</p> @see <a href="QStringMatcher.html#pattern()"><tt>pattern</tt></a> @see <a href="QStringMatcher.html#setCaseSensitivity(com.trolltech.qt.core.Qt.CaseSensitivity)"><tt>setCaseSensitivity</tt></a> @see <a href="QStringMatcher.html#indexIn(java.lang.String, int)"><tt>indexIn</tt></a> */"/> </class>