Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

ffregex.c File Reference

Implements the ffstring regular expression wrappers declared in ffregex.h. More...

#include "ffregex.h"
#include "tcrip.h"
#include <stdlib.h>
#include <sys/types.h>
#include <regex.h>
#include <string.h>

Go to the source code of this file.

Functions

static ffbool ffregex_do_match (const ffchar *needle, const ffstring *haystack, ffint32 cflags)
ffbool ffregex_match (const ffchar *needle, const ffstring *haystack)
 Matches the given haystack against the given needle regex.
ffbool ffregex_match_ci (const ffchar *needle, const ffstring *haystack)
 Case-insensitively matches the given haystack against the given needle regex.
static ffbool ffregex_do_replace (const ffchar *needle, const ffchar *replace, ffstring *haystack, ffint32 cflags)
ffbool ffregex_replace (const ffchar *needle, const ffchar *replace, ffstring *haystack)
 Does regex substitution.
ffbool ffregex_replace_ci (const ffchar *needle, const ffchar *replace, ffstring *haystack)
 Does regex substitution case-insensitively.


Detailed Description

Implements the ffstring regular expression wrappers declared in ffregex.h.

Definition in file ffregex.c.


Function Documentation

static ffbool ffregex_do_match const ffchar needle,
const ffstring haystack,
ffint32  cflags
[static]
 

Definition at line 38 of file ffregex.c.

Referenced by ffregex_match(), and ffregex_match_ci().

static ffbool ffregex_do_replace const ffchar needle,
const ffchar replace,
ffstring haystack,
ffint32  cflags
[static]
 

Definition at line 65 of file ffregex.c.

References tcregsub().

Referenced by ffregex_replace(), and ffregex_replace_ci().

ffbool ffregex_match const ffchar needle,
const ffstring haystack
 

Matches the given haystack against the given needle regex.

Returns:
1 on match; 0 on no match.

Definition at line 55 of file ffregex.c.

References ffregex_do_match().

Referenced by ffpriv_genitive_plural(), ffpriv_genitive_stem(), and main().

ffbool ffregex_match_ci const ffchar needle,
const ffstring haystack
 

Case-insensitively matches the given haystack against the given needle regex.

Returns:
1 on match; 0 on no match.

Definition at line 60 of file ffregex.c.

References ffregex_do_match().

Referenced by ffpriv_consonant_gradation(), ffpriv_general_illative(), ffpriv_partitive_plural(), ffpriv_partitive_singular(), ffpriv_partitive_stem(), ffpriv_plural_stem(), and main().

ffbool ffregex_replace const ffchar needle,
const ffchar replace,
ffstring haystack
 

Does regex substitution.

Returns:
1 if the new string differs from the haystack (and haystack has thus been changed); 0 otherwise.

Definition at line 79 of file ffregex.c.

References ffregex_do_replace().

Referenced by main().

ffbool ffregex_replace_ci const ffchar needle,
const ffchar replace,
ffstring haystack
 

Does regex substitution case-insensitively.

Returns:
1 if the new string differs from the haystack (and haystack has thus been changed); 0 otherwise.

Definition at line 84 of file ffregex.c.

References ffregex_do_replace().

Referenced by ffpriv_consonant_gradation(), and ffpriv_plural_stem().


Generated on Sun May 15 21:50:47 2005 for FinFlect by  doxygen 1.4.1