libhext: C++ Library Documentation 1.0.13-b24695d
|
Tests whether a string begins with a given literal. More...
#include <BeginsWithTest.h>
Public Member Functions | |
BeginsWithTest (std::string literal) noexcept | |
Constructs a BeginsWithTest that succeeds for subjects that begin with the given literal. | |
bool | test (const char *subject) const override |
Return true if subject begins with the given literal. | |
![]() | |
virtual std::unique_ptr< ValueTest > | clone () const override |
Clones objects of template type Derived and returns an owning pointer to the newly allocated Base. | |
![]() | |
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 begins with a given literal.
Definition at line 41 of file BeginsWithTest.h.
|
explicitnoexcept |
Constructs a BeginsWithTest that succeeds for subjects that begin with the given literal.
literal | A string that a subject must begin with. |
|
overridevirtual |
Return true if subject begins with the given literal.
subject | The string that is to be tested. |
Implements hext::ValueTest.