• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Kate

Public Member Functions

KateRegExp Class Reference

#include <kateregexp.h>

List of all members.

Public Member Functions

 KateRegExp (const QString &pattern, Qt::CaseSensitivity cs=Qt::CaseSensitive, QRegExp::PatternSyntax syntax=QRegExp::RegExp2)
QString cap (int nth=0) const
int indexIn (const QString &str, int offset, int end) const
bool isEmpty () const
bool isMultiLine () const
bool isValid () const
int lastIndexIn (const QString &str, int offset, int end) const
int matchedLength () const
int numCaptures () const
QString pattern () const
int pos (int nth=0) const
int repairPattern (bool &stillMultiLine)

Detailed Description

Definition at line 27 of file kateregexp.h.


Constructor & Destructor Documentation

KateRegExp::KateRegExp ( const QString &  pattern,
Qt::CaseSensitivity  cs = Qt::CaseSensitive,
QRegExp::PatternSyntax  syntax = QRegExp::RegExp2 
) [explicit]

Definition at line 24 of file kateregexp.cpp.


Member Function Documentation

QString KateRegExp::cap ( int  nth = 0) const [inline]

Definition at line 38 of file kateregexp.h.

int KateRegExp::indexIn ( const QString &  str,
int  offset,
int  end 
) const

Definition at line 308 of file kateregexp.cpp.

bool KateRegExp::isEmpty ( ) const [inline]

Definition at line 33 of file kateregexp.h.

bool KateRegExp::isMultiLine ( ) const

States, whether the pattern matches multiple lines, even if it was repaired using repairPattern().

Returns:
Whether the pattern matches multiple lines

Definition at line 206 of file kateregexp.cpp.

bool KateRegExp::isValid ( ) const [inline]

Definition at line 34 of file kateregexp.h.

int KateRegExp::lastIndexIn ( const QString &  str,
int  offset,
int  end 
) const

This function is a replacement for QRegExp.lastIndexIn that returns the last match that would have been found when searching forwards, which QRegExp.lastIndexIn does not.

We need this behavior to allow the user to jump back to the last match.

Parameters:
strText to search in
offsetOffset (-1 starts from end, -2 from one before the end)
Returns:
Index of match or -1 if no match is found

Definition at line 315 of file kateregexp.cpp.

int KateRegExp::matchedLength ( ) const [inline]

Definition at line 39 of file kateregexp.h.

int KateRegExp::numCaptures ( ) const [inline]

Definition at line 36 of file kateregexp.h.

QString KateRegExp::pattern ( ) const [inline]

Definition at line 35 of file kateregexp.h.

int KateRegExp::pos ( int  nth = 0) const [inline]

Definition at line 37 of file kateregexp.h.

int KateRegExp::repairPattern ( bool &  stillMultiLine)

Repairs a regular Expression pattern.

This is a workaround to make "." and "\s" not match newlines, which currently is the unconfigurable default in QRegExp.

Parameters:
stillMultiLineMulti-line after reparation flag
Returns:
Number of replacements done

Definition at line 35 of file kateregexp.cpp.


The documentation for this class was generated from the following files:
  • kateregexp.h
  • kateregexp.cpp

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal