Objective-C++ Preprocessor  5.0 with ARC & GC
C++ classes to enhance syntax and manage reference counting.
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
OOPattern Class Reference

#include <objstr.h>

Public Member Functions

oo_inline OOPattern ()
 
oo_inline OOPattern (cOOString patin, NSRegularExpressionOptions flags=OO_REG_FLAGS)
 
oo_inline void init (cOOString patin, NSRegularExpressionOptions flags=OO_REG_FLAGS)
 
oo_inline NSTextCheckingResult * exec (cOOString input) const
 
oo_inline NSRange range (cOOString input)
 
oo_inline OOStringArray split (cOOString str) const
 
oo_inline OOStringArray matchAll (cOOString str) const
 
oo_inline OOStringArray match (cOOString str) const
 
oo_inline OOStringArray parse (cOOString str) const
 
oo_inline OOStringArrayArray parseAll (cOOString str) const
 
oo_inline OOString blockReplace (cOOString str, OOReplaceBlock callback) const
 

Private Member Functions

oo_inline OOStringArray matchGroups (cOOString str, NSTextCheckingResult *matches) const
 

Private Attributes

OOString pat
 
OORef< NSRegularExpression * > regex
 

Friends

class OOReplace
 

Detailed Description

A class to represent a patten matching operations against a string.

Usage:

OOStringArray words = OOPattern( "\w+" ).match();

Definition at line 607 of file objstr.h.

Constructor & Destructor Documentation

oo_inline OOPattern::OOPattern ( )
inline

Definition at line 623 of file objstr.h.

oo_inline OOPattern::OOPattern ( cOOString  patin,
NSRegularExpressionOptions  flags = OO_REG_FLAGS 
)
inline

Definition at line 624 of file objstr.h.

Member Function Documentation

oo_inline OOString OOPattern::blockReplace ( cOOString  str,
OOReplaceBlock  callback 
) const
inline

Definition at line 701 of file objstr.h.

oo_inline NSTextCheckingResult* OOPattern::exec ( cOOString  input) const
inline

Definition at line 650 of file objstr.h.

oo_inline void OOPattern::init ( cOOString  patin,
NSRegularExpressionOptions  flags = OO_REG_FLAGS 
)
inline

Definition at line 628 of file objstr.h.

oo_inline OOStringArray OOPattern::match ( cOOString  str) const
inline

Definition at line 675 of file objstr.h.

oo_inline OOStringArray OOPattern::matchAll ( cOOString  str) const
inline

Definition at line 669 of file objstr.h.

oo_inline OOStringArray OOPattern::matchGroups ( cOOString  str,
NSTextCheckingResult *  matches 
) const
inlineprivate

Definition at line 615 of file objstr.h.

oo_inline OOStringArray OOPattern::parse ( cOOString  str) const
inline

Definition at line 686 of file objstr.h.

oo_inline OOStringArrayArray OOPattern::parseAll ( cOOString  str) const
inline

Definition at line 695 of file objstr.h.

oo_inline NSRange OOPattern::range ( cOOString  input)
inline

Definition at line 653 of file objstr.h.

oo_inline OOStringArray OOPattern::split ( cOOString  str) const
inline

Definition at line 657 of file objstr.h.

Friends And Related Function Documentation

friend class OOReplace
friend

Definition at line 608 of file objstr.h.

Member Data Documentation

OOString OOPattern::pat
private

Definition at line 609 of file objstr.h.

OORef<NSRegularExpression *> OOPattern::regex
private

Definition at line 613 of file objstr.h.


The documentation for this class was generated from the following file: