QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
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 39 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 755 of file qgsstringutils.cpp.
|
inline |
Returns true
if match is case sensitive.
Definition at line 63 of file qgsstringutils.h.
|
static |
Creates a new QgsStringReplacement from an encoded properties map.
Definition at line 791 of file qgsstringutils.cpp.
|
inline |
Returns the string matched by this object.
Definition at line 57 of file qgsstringutils.h.
|
inline |
Definition at line 75 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 768 of file qgsstringutils.cpp.
QgsStringMap QgsStringReplacement::properties | ( | ) | const |
Returns a map of the replacement properties.
Definition at line 781 of file qgsstringutils.cpp.
|
inline |
Returns the string to replace matches with.
Definition at line 60 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 66 of file qgsstringutils.h.