|
Objective-C++ Preprocessor
5.0 with ARC & GC
C++ classes to enhance syntax and manage reference counting.
|
#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 OOString & | operator= (cOOString replacement) |
| oo_inline OOString & | operator= (NSString *replacement) |
| oo_inline OOString & | operator= (const char *replacement) |
| oo_inline OOString & | operator= (cOOStringArray replacements) |
| oo_inline OOString & | operator= (OOReplaceBlock callback) |
| oo_inline OOString & | operator= (OOTmpString(^callback)(cOOStringArray groups)) |
| oo_inline OOString & | operator= (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 | |
| OOString * | str |
| OOString | idx |
Friends | |
| class | OOString |
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();
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
1.8.2