libhext: C++ Library Documentation
1.0.12-3ea013c
|
Tests whether a string contains all given words. More...
Public Member Functions | |
ContainsWordsTest (std::string words) | |
Constructs a ContainsWordsTest that succeeds for subjects that contain all words given in a string. More... | |
ContainsWordsTest (std::vector< std::string > words) noexcept | |
Constructs a ContainsWordsTest that succeeds for subjects that contain all words given in a vector. More... | |
bool | test (const char *subject) const override |
Returns true if subject contains all given words. More... | |
Public Member Functions inherited from hext::Cloneable< ContainsWordsTest, ValueTest > | |
virtual std::unique_ptr< ValueTest > | clone () const override |
Clones objects of template type Derived and returns an owning pointer to the newly allocated Base. More... | |
Public Member Functions inherited from hext::ValueTest | |
ValueTest () noexcept=default | |
ValueTest (const ValueTest &)=default | |
ValueTest (ValueTest &&) noexcept=default | |
ValueTest & | operator= (const ValueTest &)=default |
ValueTest & | operator= (ValueTest &&) noexcept=default |
virtual | ~ValueTest () noexcept=default |
Tests whether a string contains all given words.
Word boundaries are the beginning and end of subject, and spaces.
Definition at line 44 of file ContainsWordsTest.h.
|
explicit |
Constructs a ContainsWordsTest that succeeds for subjects that contain all words given in a string.
words | A string that contains space-separated words. |
|
explicitnoexcept |
Constructs a ContainsWordsTest that succeeds for subjects that contain all words given in a vector.
words | A vector of words. |
|
overridevirtual |
Returns true if subject contains all given words.
subject | The string that is to be tested. |
Implements hext::ValueTest.