QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
A representation of a single string replacement. More...
#include <qgsstringutils.h>
Public Member Functions | |
QgsStringReplacement (const QString &match, const QString &replacement, bool caseSensitive=false, bool wholeWordOnly=false) | |
Constructor for QgsStringReplacement. More... | |
bool | caseSensitive () const |
Returns true if match is case sensitive. More... | |
QString | match () const |
Returns the string matched by this object. More... | |
bool | operator== (const QgsStringReplacement &other) |
QString | process (const QString &input) const |
Processes a given input string, applying any valid replacements which should be made. More... | |
QgsStringMap | properties () const |
Returns a map of the replacement properties. More... | |
QString | replacement () const |
Returns the string to replace matches with. More... | |
bool | wholeWordOnly () const |
Returns true if match only applies to whole words, or false if partial word matches are permitted. More... | |
Static Public Member Functions | |
static QgsStringReplacement | fromProperties (const QgsStringMap &properties) |
Creates a new QgsStringReplacement from an encoded properties map. More... | |
A representation of a single string replacement.
Definition at line 35 of file qgsstringutils.h.
QgsStringReplacement::QgsStringReplacement | ( | const QString & | match, |
const QString & | replacement, | ||
bool | caseSensitive = false , |
||
bool | wholeWordOnly = false |
||
) |
Constructor for QgsStringReplacement.
match | string to match |
replacement | string to replace match with |
caseSensitive | set to true for a case sensitive match |
wholeWordOnly | set to true to match complete words only, or false to allow partial word matches |
Definition at line 566 of file qgsstringutils.cpp.
|
inline |
Returns true
if match is case sensitive.
Definition at line 59 of file qgsstringutils.h.
|
static |
Creates a new QgsStringReplacement from an encoded properties map.
Definition at line 600 of file qgsstringutils.cpp.
|
inline |
Returns the string matched by this object.
Definition at line 53 of file qgsstringutils.h.
|
inline |
Definition at line 71 of file qgsstringutils.h.
QString QgsStringReplacement::process | ( | const QString & | input | ) | const |
Processes a given input string, applying any valid replacements which should be made.
input | input string |
Definition at line 577 of file qgsstringutils.cpp.
QgsStringMap QgsStringReplacement::properties | ( | ) | const |
Returns a map of the replacement properties.
Definition at line 590 of file qgsstringutils.cpp.
|
inline |
Returns the string to replace matches with.
Definition at line 56 of file qgsstringutils.h.
|
inline |
Returns true
if match only applies to whole words, or false
if partial word matches are permitted.
Definition at line 62 of file qgsstringutils.h.