Public Types | Public Member Functions | List of all members
nuspell::Condition< CharT > Class Template Reference

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

#include <structures.hxx>

Public Types

enum  Span_Type { NORMAL, DOT, ANY_OF, NONE_OF }
using StrT = std::basic_string< CharT >
template<class T , class U , class V >
using tuple = std::tuple< T, U, V >
template<class T >
using vector = std::vector< T >

Public Member Functions

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

Detailed Description

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

Limited regular expression matching used in affix entries.

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

Member Enumeration Documentation

◆ Span_Type

template<class CharT >
enum nuspell::Condition::Span_Type

normal character


wildcard character


set of possible characters


set of excluding characters

Member Function Documentation

◆ match()

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

Checks if provided string matched the condition.

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

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