Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtCore.QStringMatcher Class Reference

The QStringMatcher class holds a sequence of characters that can be quickly matched in a Unicode string. More...

Inheritance diagram for QtCore.QStringMatcher:
Collaboration diagram for QtCore.QStringMatcher:

Public Member Functions

 QStringMatcher ()
 
 
 QStringMatcher (QStringMatcher other)
 
 
 QStringMatcher (QChar uc, int len, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive)
 
 
 QStringMatcher (string pattern, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive)
 
 
virtual void CreateProxy ()
 
new int IndexIn (QChar str, int length, int from=0)
 
 
new int IndexIn (string str, int from=0)
 
 
new void Dispose ()
 

Protected Member Functions

 QStringMatcher (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

new Qt.CaseSensitivity CaseSensitivity [get, set]
 
 
new string Pattern [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QStringMatcher class holds a sequence of characters that can be quickly matched in a Unicode string.

This class is useful when you have a sequence of QChars 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 indexIn() is faster than matching a plain QString with QString::indexOf() if repeated matching takes place. This class offers no benefit if you are doing one-off string matches.

Create the QStringMatcher with the QString you want to search for. Then call indexIn() on the QString that you want to search.

See also QString, QByteArrayMatcher, and QRegExp.

Constructor & Destructor Documentation

QtCore.QStringMatcher.QStringMatcher ( System.Type  dummy)
protected
QtCore.QStringMatcher.QStringMatcher ( )

Constructs an empty string matcher that won't match anything. Call setPattern() to give it a pattern to match.

QtCore.QStringMatcher.QStringMatcher ( QStringMatcher  other)

Copies the other string matcher to this string matcher.

QtCore.QStringMatcher.QStringMatcher ( QChar  uc,
int  len,
Qt.CaseSensitivity  cs = Qt.CaseSensitivity.CaseSensitive 
)

Constructs an empty string matcher that won't match anything. Call setPattern() to give it a pattern to match.

QtCore.QStringMatcher.QStringMatcher ( string  pattern,
Qt.CaseSensitivity  cs = Qt.CaseSensitivity.CaseSensitive 
)

Constructs an empty string matcher that won't match anything. Call setPattern() to give it a pattern to match.

Member Function Documentation

virtual void QtCore.QStringMatcher.CreateProxy ( )
virtual
new void QtCore.QStringMatcher.Dispose ( )
new int QtCore.QStringMatcher.IndexIn ( QChar  str,
int  length,
int  from = 0 
)

Searches the string starting at str (of length length) from character position from (default 0, i.e. from the first character), for the string pattern() that was set in the constructor or in the most recent call to setPattern(). Returns the position where the pattern() matched in str, or -1 if no match was found.

This function was introduced in Qt 4.5.

See also setPattern() and setCaseSensitivity().

new int QtCore.QStringMatcher.IndexIn ( string  str,
int  from = 0 
)

Searches the string str from character position from (default 0, i.e. from the first character), for the string pattern() that was set in the constructor or in the most recent call to setPattern(). Returns the position where the pattern() matched in str, or -1 if no match was found.

See also setPattern() and setCaseSensitivity().

Member Data Documentation

SmokeInvocation QtCore.QStringMatcher.interceptor
protected

Property Documentation

new Qt.CaseSensitivity QtCore.QStringMatcher.CaseSensitivity
getset

Returns the case sensitivity setting for this string matcher.

Sets the case sensitivity setting of this string matcher to cs.

new string QtCore.QStringMatcher.Pattern
getset

Returns the string pattern that this string matcher will search for.

Sets the string that this string matcher will search for to pattern.

virtual System.IntPtr QtCore.QStringMatcher.SmokeObject
getset