Kate
KatePlainTextSearch Class Reference
#include <kateplaintextsearch.h>
Public Member Functions | |
KatePlainTextSearch (KTextEditor::Document *document, Qt::CaseSensitivity caseSensitivity, bool wholeWords) | |
~KatePlainTextSearch () | |
KTextEditor::Range | search (const QString &text, const KTextEditor::Range &inputRange, bool backwards=false) |
Detailed Description
Object to help to search for plain text.
This should be NO QObject, it is created too often! I measured that, if you create it 20k times to replace for example " " in a document, that takes seconds on a modern machine!
Definition at line 40 of file kateplaintextsearch.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 37 of file kateplaintextsearch.cpp.
KatePlainTextSearch::~KatePlainTextSearch | ( | ) |
Definition at line 47 of file kateplaintextsearch.cpp.
Member Function Documentation
KTextEditor::Range KatePlainTextSearch::search | ( | const QString & | text, |
const KTextEditor::Range & | inputRange, | ||
bool | backwards = false |
||
) |
Search for the given text
inside the range inputRange
taking into account whether to search casesensitive
and backwards
.
- Parameters
-
text text to search for inputRange Range to search in casesensitive if true, the search is performed case sensitive, otherwise case insensitive backwards if true, the search will be backwards
- Returns
- The valid range of the matched text if
text
was found. If thetext
was not found, the returned range is not valid (see Range::isValid()).
- See also
- KTextEditor::Range
Definition at line 52 of file kateplaintextsearch.cpp.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.