libhext: C++ Library Documentation  1.0.8-3ad0ae4
Public Member Functions | List of all members
hext::CollapseWsPipe Class Referencefinal

Removes whitespace from beginning and end and collapses multiple whitespace to a single space. More...

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

Public Member Functions

std::string transform (std::string str) const override
 Collapses multiple whitespace to a single space. More...
 
- Public Member Functions inherited from hext::Cloneable< CollapseWsPipe, StringPipe >
virtual std::unique_ptr< StringPipeclone () 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::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

Removes whitespace from beginning and end and collapses multiple whitespace to a single space.

Example:
" Like\na Rolling\n\tStone "
becomes
"Like a Rolling Stone"

Definition at line 42 of file CollapseWsPipe.h.

Member Function Documentation

◆ transform()

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

Collapses multiple whitespace to a single space.

Implements hext::StringPipe.


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