Generic algorithms on strings. More...
#include <claw/impl/string_algorithm.tpp>
Go to the source code of this file.
Namespaces | |
namespace | claw |
This is the main namespace. | |
namespace | claw::text |
Everything about text processing. | |
Functions | |
template<typename StreamType , typename StringType > | |
StreamType & | claw::text::getline (StreamType &is, StringType &str) |
A portable version of std::getline( is, str, ' ' ) that removes a tailing ''. | |
template<class StringType > | |
void | claw::text::trim_left (StringType &str, const typename StringType::value_type *const s=" ") |
Remove characters at the begining of a string. | |
template<class StringType > | |
void | claw::text::trim_right (StringType &str, const typename StringType::value_type *const s=" ") |
Remove characters at the end of a string. | |
template<class StringType > | |
void | claw::text::trim (StringType &str, const typename StringType::value_type *const s=" ") |
Remove characters at the begining end at the end of a string. | |
template<class StringType > | |
void | claw::text::squeeze (StringType &str, const typename StringType::value_type *const s) |
Squeeze successive characters of a string into one character. | |
template<typename T , class StringType > | |
bool | claw::text::is_of_type (const StringType &str) |
Test if the content of a string is immediately convertible to a type. | |
template<class BackInsertion , class StringType > | |
void | claw::text::split (BackInsertion &sequence, const StringType &str, const typename StringType::value_type sep) |
Split a string into several substrings, according to a given separator. |
Generic algorithms on strings.
Definition in file string_algorithm.hpp.