Nuspell
spellchecker
Classes | Public Member Functions | List of all members
nuspell::v3::Condition< CharT > Class Template Reference

Limited regular expression matching used in affix entries. More...

#include <structures.hxx>

Public Member Functions

 Condition (const Str &condition)
 
 Condition (Str &&condition)
 
 Condition (const CharT *condition)
 
auto & operator= (const Str &condition)
 
auto & operator= (Str &&condition)
 
auto & operator= (const CharT *condition)
 
auto match (const Str &s, size_t pos=0, size_t len=Str::npos) const -> bool
 Checks if provided string matched the condition. More...
 
auto match_prefix (const Str &s) const
 
auto match_suffix (const Str &s) const
 

Detailed Description

template<class CharT>
class nuspell::v3::Condition< CharT >

Limited regular expression matching used in affix entries.

This implementation increases performance over the regex implementation in the standard library.

Member Function Documentation

◆ match()

template<class CharT >
auto nuspell::v3::Condition< CharT >::match ( const Str &  s,
size_t  pos = 0,
size_t  len = Str::npos 
) const -> bool

Checks if provided string matched the condition.

Parameters
sstring to check if it matches the condition.
posstart position for string, default is 0.
lenlength of string counting from the start position.
Returns
The valueof true when string matched condition.

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