libhext: C++ Library Documentation 1.0.13-b24695d
|
Replaces a string within a string according to a given regex. More...
#include <RegexReplacePipe.h>
Public Member Functions | |
RegexReplacePipe (boost::regex regex, std::string str) | |
Constructs a RegexReplacePipe. | |
std::string | transform (std::string str) const override |
Replaces a string within str according to the regex given in the constructor. | |
![]() | |
virtual std::unique_ptr< StringPipe > | clone () const override |
Clones objects of template type Derived and returns an owning pointer to the newly allocated Base. | |
![]() | |
StringPipe () noexcept | |
StringPipe (const StringPipe &other) | |
StringPipe (StringPipe &&) noexcept=default | |
StringPipe & | operator= (const StringPipe &other) |
StringPipe & | operator= (StringPipe &&) noexcept=default |
virtual | ~StringPipe () noexcept=default |
std::string | pipe (std::string str) const |
Calls StringPipe::transform successively until the whole StringPipe chain was traversed. | |
void | append (std::unique_ptr< StringPipe > pipe) noexcept |
Append a StringPipe at the end of the chain. | |
template<typename StringPipeType , typename... Args> | |
void | emplace (Args &&... arg) |
Construct a StringPipe at the end of the chain. | |
Replaces a string within a string according to a given regex.
Definition at line 41 of file RegexReplacePipe.h.
hext::RegexReplacePipe::RegexReplacePipe | ( | boost::regex | regex, |
std::string | str | ||
) |
Constructs a RegexReplacePipe.
regex | A regular expression that is applied to the string. |
str | The string that will replace the portion matching regex. |
|
overridevirtual |
Replaces a string within str according to the regex given in the constructor.
Implements hext::StringPipe.