|
Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <Regexp.h>
Properties | |
| size_t | numberOfSubExpressions |
| The number of parenthesized sub-expressions. More... | |
| Object | object |
| The superclass. More... | |
| int | options |
A bitwise-or of REG_ICASE, REG_NEWLINE. More... | |
| const char * | pattern |
| The pattern. More... | |
| ident | regex |
| The backing regular expression. More... | |
Properties inherited from Object | |
| Class * | clazz |
| Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
| Class * | _Regexp (void) |
| The Regexp archetype. More... | |
| Regexp * | initWithPattern (Regexp *self, const char *pattern, int options) |
| Initializes this regular expression. More... | |
| _Bool | matchesCharacters (const Regexp *self, const char *chars, int options, Range **matches) |
| Matches this regular expression against the given characters. More... | |
| _Bool | matchesString (const Regexp *self, const String *string, int options, Range **matches) |
| Matches this regular expression against the given String. More... | |
Methods inherited from Object | |
| Class * | _Object (void) |
| The Object archetype. More... | |
| Object * | copy (const Object *self) |
| Creates a shallow copy of this Object. More... | |
| void | dealloc (Object *self) |
| Frees all resources held by this Object. More... | |
| String * | description (const Object *self) |
| int | hash (const Object *self) |
| Object * | init (Object *self) |
| Initializes this Object. More... | |
| _Bool | isEqual (const Object *self, const Object *other) |
| Tests equality of the other Object. More... | |
| _Bool | isKindOfClass (const Object *self, const Class *clazz) |
| Tests for Class hierarchy membership. More... | |
Protected Attributes | |
| RegexpInterface * | interface |
| The interface. More... | |
Protected Attributes inherited from Object | |
| ObjectInterface * | interface |
| The interface. More... | |
Related Functions | |
| OBJECTIVELY_EXPORT Regexp * | re (const char *pattern, int options) |
| A convenience function for instantiating Regexps. More... | |
| size_t Regexp::numberOfSubExpressions |
| Class * _Regexp | ( | void | ) |
The Regexp archetype.
Definition at line 199 of file Regexp.c.
Initializes this regular expression.
| self | The Regexp. |
| pattern | The POSIX regular expression pattern. |
| options | A bitwise-or of REG_ICASE, REG_NEWLINE. |
NULL on error. Definition at line 112 of file Regexp.c.
Matches this regular expression against the given characters.
| self | The Regexp. |
| chars | The characters to match. |
| options | A bitwise-or of REG_NOTBOL, REG_NOTEOL. |
| matches | An optional pointer to return matched sub-expressions. |
true if this Regexp matched chars, false otherwise. matches will be dynamically allocated and contain numberOfSubExpressions + 1 Ranges. matches[0] will identify the Range of chars that matched the entire pattern. matches[1..n] will identify the Range of each corresponding sub-expression. The caller must free matches when done with it. Definition at line 134 of file Regexp.c.
Matches this regular expression against the given String.
| self | The Regexp. |
| string | The String to match. |
| options | A bitwise-or of REG_NOTBOL, REG_NOTEOL. |
| matches | An optional pointer to return matched sub-expressions. |
true if this expression matches string, false otherwise. matches will be dynamically allocated and contain numberOfSubExpressions + 1 Ranges. matches[0] will identify the Range of chars that matched the entire pattern. matches[1..n] will identify the Range of each corresponding sub-expression. The caller must free matches when done with it. Definition at line 170 of file Regexp.c.
|
related |
A convenience function for instantiating Regexps.
| pattern | The POSIX regular expression pattern. |
| options | A bitwise-or of REG_ICASE, REG_NEWLINE. |
NULL on error. Definition at line 219 of file Regexp.c.