Krita Source Code Documentation
Loading...
Searching...
No Matches
KisResourceSearchBoxFilter.cpp File Reference
#include "KisResourceSearchBoxFilter.h"
#include <QRegExp>
#include <QRegularExpression>
#include <QList>
#include <QSet>
#include <kis_debug.h>

Go to the source code of this file.

Classes

class  KisResourceSearchBoxFilter
 

Functions

bool checkDelimitersAndCut (const QChar &begin, const QChar &end, QString &token)
 
bool checkDelimitersAndCut (const QChar &beginEnd, QString &token)
 
bool checkPrefixAndCut (QChar &prefix, QString &token)
 

Function Documentation

◆ checkDelimitersAndCut() [1/2]

bool checkDelimitersAndCut ( const QChar & begin,
const QChar & end,
QString & token )

Definition at line 53 of file KisResourceSearchBoxFilter.cpp.

53 {
54 if (token.startsWith(begin) && token.endsWith(end)) {
55 token.remove(0, 1);
56 token = token.left(token.length() - 1);
57 return true;
58 } else {
59 return false;
60 }
61}

◆ checkDelimitersAndCut() [2/2]

bool checkDelimitersAndCut ( const QChar & beginEnd,
QString & token )

Definition at line 63 of file KisResourceSearchBoxFilter.cpp.

63 {
64 return checkDelimitersAndCut(beginEnd, beginEnd, token);
65}
bool checkDelimitersAndCut(const QChar &begin, const QChar &end, QString &token)

References checkDelimitersAndCut().

◆ checkPrefixAndCut()

bool checkPrefixAndCut ( QChar & prefix,
QString & token )

Definition at line 67 of file KisResourceSearchBoxFilter.cpp.

67 {
68 if (token.startsWith(prefix)) {
69 token.remove(0, 1);
70 return true;
71 } else {
72 return false;
73 }
74}