LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::CharSet Class Reference

#include <TextView.h>

Collaboration diagram for swoc::CharSet:
Collaboration graph

Public Member Functions

constexpr CharSet (TextView const &chars)
 
bool operator() (unsigned char c) const
 
bool operator() (char c) const
 

Protected Attributes

std::bitset< std::numeric_limits< unsigned char >::max()+1 > _chars
 

Detailed Description

A set of characters.

Definition at line 42 of file TextView.h.

Constructor & Destructor Documentation

◆ CharSet()

swoc::CharSet::CharSet ( TextView const & chars)
inlineconstexpr

Construct from character sequence.

Parameters
charsCharacter sequence.

The charset becomes true for every character in the sequence.

Definition at line 1105 of file TextView.h.

Member Function Documentation

◆ operator()() [1/2]

bool swoc::CharSet::operator() ( char c) const
inline

Check if character is in the charset.

Parameters
cCharacter to check.
Returns
true if c is in the charset, false if not.

Definition at line 1117 of file TextView.h.

◆ operator()() [2/2]

bool swoc::CharSet::operator() ( unsigned char c) const
inline

Check if character is in the charset.

Parameters
cCharacter to check.
Returns
true if c is in the charset, false if not.

Definition at line 1112 of file TextView.h.

Member Data Documentation

◆ _chars

std::bitset<std::numeric_limits<unsigned char>::max() + 1> swoc::CharSet::_chars
protected

Definition at line 69 of file TextView.h.


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