General Utility Library for C++14  2.7
trim.h
Go to the documentation of this file.
1 
24 #ifndef GUL14_TRIM_H_
25 #define GUL14_TRIM_H_
26 
27 #include "gul14/internal.h"
28 #include "gul14/string_util.h"
29 #include "gul14/string_view.h"
30 
31 namespace gul14 {
32 
33 
51 GUL_EXPORT
52 std::string trim(string_view str, string_view ws_chars = default_whitespace_characters);
53 
71 GUL_EXPORT
73 
91 GUL_EXPORT
93 
111 GUL_EXPORT
113 
131 GUL_EXPORT
133 
151 GUL_EXPORT
153 
154 
155 // TODO: Add trim_*_inplace
156 
157 
158 } // namespace gul14
159 
160 
167 #endif
gul14::trim_sv
GUL_EXPORT string_view trim_sv(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading and trailing whitespace (or a custom set of characters) from a string,...
Definition: trim.cc:34
gul14::trim_right
GUL_EXPORT std::string trim_right(string_view str, string_view ws_chars=default_whitespace_characters)
Trim trailing whitespace (or a custom set of characters) from a string, returning a new std::string.
Definition: trim.cc:61
gul14::trim_left
GUL_EXPORT std::string trim_left(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading whitespace (or a custom set of characters) from a string, returning a new std::string.
Definition: trim.cc:46
gul14::basic_string_view< char >
gul14::string_view
basic_string_view< char > string_view
A view to a contiguous sequence of chars.
Definition: string_view.h:628
gul14::default_whitespace_characters
const GUL_EXPORT string_view default_whitespace_characters
The default characters that are treated as whitespace by GUL.
Definition: string_util.cc:28
string_view.h
Provides a gul14::string_view that is fully compatible with C++17's std::string_view.
internal.h
Definition of macros used internally by GUL.
gul14::trim_right_sv
GUL_EXPORT string_view trim_right_sv(string_view str, string_view ws_chars=default_whitespace_characters)
Trim trailing whitespace (or a custom set of characters) from a string, returning a view into the ori...
Definition: trim.cc:66
gul14
Namespace gul14 contains all functions and classes of the General Utility Library.
Definition: doxygen.h:26
trim.h
Declarations of trim(), trim_left(), trim_right(), trim_sv(), trim_left_sv(), and trim_right_sv().
string_util.h
Declarations of string utility functions for the General Utility Library.
gul14::trim
GUL_EXPORT std::string trim(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading and trailing whitespace (or a custom set of characters) from a string,...
Definition: trim.cc:29
gul14::trim_left_sv
GUL_EXPORT string_view trim_left_sv(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading whitespace (or a custom set of characters) from a string, returning a view into the orig...
Definition: trim.cc:51