All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
hext::TrimPipe Class Referencefinal

Trims characters from the beginning and end of a string. More...

Inheritance diagram for hext::TrimPipe:
Inheritance graph
[legend]
Collaboration diagram for hext::TrimPipe:
Collaboration graph
[legend]

Public Member Functions

 TrimPipe (std::string trim_any_of=" ")
 Constructs a TrimPipe. More...
 
std::string transform (std::string str) const override
 Removes all left and right characters that were given in the constructor from str. More...
 
- Public Member Functions inherited from hext::Cloneable< TrimPipe, StringPipe >
virtual std::unique_ptr
< StringPipe
clone () const
 Clones objects of template type Derived and returns an owning pointer to the newly allocated Base. More...
 
- Public Member Functions inherited from hext::StringPipe
 StringPipe () noexcept
 
 StringPipe (const StringPipe &other)
 
 StringPipe (StringPipe &&) noexcept=default
 
StringPipeoperator= (const StringPipe &other)
 
StringPipeoperator= (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. More...
 
void append (std::unique_ptr< StringPipe > pipe) noexcept
 Append a StringPipe at the end of the chain. More...
 
template<typename StringPipeType , typename... Args>
void emplace (Args &&...arg)
 Construct a StringPipe at the end of the chain. More...
 

Detailed Description

Trims characters from the beginning and end of a string.

Trims space by default.

Definition at line 32 of file TrimPipe.h.

Constructor & Destructor Documentation

hext::TrimPipe::TrimPipe ( std::string  trim_any_of = " ")
explicit

Constructs a TrimPipe.

Parameters
trim_any_ofTrim any of these characters from beginning or end of the string. Default: Trim spaces.

Member Function Documentation

std::string hext::TrimPipe::transform ( std::string  str) const
overridevirtual

Removes all left and right characters that were given in the constructor from str.

Implements hext::StringPipe.


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