25 #include <edsp/meta/iterator.hpp> 29 namespace edsp {
namespace string {
35 template <
typename Char>
36 inline void ltrim(std::basic_string<Char>& str) {
37 str.erase(std::begin(str), std::find_if(std::begin(str), std::end(str),
38 [](Char character) {
return !std::isspace(character); }));
45 template <
typename Char>
46 inline void rtrim(std::basic_string<Char>& str) {
48 std::find_if(std::rbegin(str), std::rend(str), [](Char character) {
return !std::isspace(character); })
57 template <
typename Char>
58 inline void trim(std::basic_string<Char>& str) {
65 #endif //EDSP_TRIM_HPP void ltrim(std::basic_string< Char > &str)
Filters the leading whitespace of the input string.
Definition: trim.hpp:36
void trim(std::basic_string< Char > &str)
Filters the leading and trailing whitespace of the input string.
Definition: trim.hpp:58
void rtrim(std::basic_string< Char > &str)
Filters the trailing whitespace of the last position of the input string.
Definition: trim.hpp:46
Definition: amplifier.hpp:29