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
OOStringSearch Class Reference

#include <objstr.h>

Public Member Functions

oo_inline NSRange range () const
 
oo_inline operator BOOL () const
 
oo_inline BOOL operator! () const
 
oo_inline NSRange operator& () const
 
oo_inline OOString operator* () const
 
oo_inline operator OOString () const
 
oo_inline OOStringArray match () const
 
oo_inline operator OOStringArray () const
 
oo_inline operator OOStringArrayArray () const
 
oo_inline OOStringoperator= (cOOString replacement)
 
oo_inline OOStringoperator= (NSString *replacement)
 
oo_inline OOStringoperator= (const char *replacement)
 
oo_inline OOStringoperator= (cOOStringArray replacements)
 
oo_inline OOStringoperator= (OOReplaceBlock callback)
 
oo_inline OOStringoperator= (OOTmpString(^callback)(cOOStringArray groups))
 
oo_inline OOStringoperator= (cOOStringDictionary replacements)
 
oo_inline OOString operator[] (int group) const
 
oo_inline OOStringArray operator~ ()
 

Private Member Functions

oo_inline OOStringSearch (const OOString *ref, cOOString sub)
 
oo_inline OOPattern pattern () const
 

Private Attributes

OOStringstr
 
OOString idx
 

Friends

class OOString
 

Detailed Description

Internal class representing subscript by string which performs a search into the string. Assigning to for example str["BARRY"] = @"BAZ" will change all occurances of "BARRY" in the string to "BAZ".

Usage:

OOString str <<= "BARRY is great";
str[@"great"] = @"an egotist";

A class to represent a match and replace operations against a string. uses BSD regex documented in "man regex"

Usage:

OOString quoted = OOReplace( "/(\w+)/'$1'/" ).exec();

Definition at line 830 of file objstr.h.

Constructor & Destructor Documentation

oo_inline OOStringSearch::OOStringSearch ( const OOString ref,
cOOString  sub 
)
inlineprivate

Definition at line 833 of file objstr.h.

Member Function Documentation

oo_inline OOStringArray OOStringSearch::match ( ) const
inline

Definition at line 881 of file objstr.h.

oo_inline OOStringSearch::operator BOOL ( ) const
inline

Definition at line 863 of file objstr.h.

oo_inline OOStringSearch::operator OOString ( ) const
inline

Definition at line 877 of file objstr.h.

oo_inline OOStringSearch::operator OOStringArray ( ) const
inline

Definition at line 885 of file objstr.h.

oo_inline OOStringSearch::operator OOStringArrayArray ( ) const
inline

Definition at line 888 of file objstr.h.

oo_inline BOOL OOStringSearch::operator! ( ) const
inline

Definition at line 867 of file objstr.h.

oo_inline NSRange OOStringSearch::operator& ( ) const
inline

Definition at line 870 of file objstr.h.

oo_inline OOString OOStringSearch::operator* ( ) const
inline

Definition at line 874 of file objstr.h.

oo_inline OOString& OOStringSearch::operator= ( cOOString  replacement)
inline

Definition at line 892 of file objstr.h.

oo_inline OOString& OOStringSearch::operator= ( NSString *  replacement)
inline

Definition at line 895 of file objstr.h.

oo_inline OOString& OOStringSearch::operator= ( const char *  replacement)
inline

Definition at line 898 of file objstr.h.

oo_inline OOString& OOStringSearch::operator= ( cOOStringArray  replacements)
inline

Definition at line 901 of file objstr.h.

oo_inline OOString& OOStringSearch::operator= ( OOReplaceBlock  callback)
inline

Definition at line 904 of file objstr.h.

oo_inline OOString& OOStringSearch::operator= ( OOTmpString(^)(cOOStringArray groups)  callback)
inline

Definition at line 907 of file objstr.h.

oo_inline OOString& OOStringSearch::operator= ( cOOStringDictionary  replacements)
inline

Definition at line 910 of file objstr.h.

oo_inline OOString OOStringSearch::operator[] ( int  group) const
inline

Definition at line 916 of file objstr.h.

oo_inline OOStringArray OOStringSearch::operator~ ( )
inline

Definition at line 919 of file objstr.h.

oo_inline OOPattern OOStringSearch::pattern ( ) const
inlineprivate

Definition at line 846 of file objstr.h.

oo_inline NSRange OOStringSearch::range ( ) const
inline

Definition at line 850 of file objstr.h.

Friends And Related Function Documentation

friend class OOString
friend

Definition at line 831 of file objstr.h.

Member Data Documentation

OOString OOStringSearch::idx
private

Definition at line 832 of file objstr.h.

OOString* OOStringSearch::str
private

Definition at line 832 of file objstr.h.


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