Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Nektar::StringUtils::IsAnyOf Class Reference

Predicate matching any of a set of characters. More...

#include <StringUtils.hpp>

Public Member Functions

 IsAnyOf (std::string_view chars)
 
bool operator() (char c) const
 

Private Attributes

std::string m_chars
 

Detailed Description

Predicate matching any of a set of characters.

Definition at line 72 of file StringUtils.hpp.

Constructor & Destructor Documentation

◆ IsAnyOf()

Nektar::StringUtils::IsAnyOf::IsAnyOf ( std::string_view  chars)
inlineexplicit

Definition at line 75 of file StringUtils.hpp.

75 : m_chars(chars)
76 {
77 }

Member Function Documentation

◆ operator()()

bool Nektar::StringUtils::IsAnyOf::operator() ( char  c) const
inline

Definition at line 79 of file StringUtils.hpp.

80 {
81 return m_chars.find(c) != std::string::npos;
82 }

References m_chars.

Member Data Documentation

◆ m_chars

std::string Nektar::StringUtils::IsAnyOf::m_chars
private

Definition at line 85 of file StringUtils.hpp.

Referenced by operator()().