General Utility Library for C++14  2.8
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
Definition of macros used internally by GUL.
Namespace gul14 contains all functions and classes of the General Utility Library.
Definition: doxygen.h:26
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
GUL_EXPORT const string_view default_whitespace_characters
The default characters that are treated as whitespace by GUL.
Definition: string_util.cc:28
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
basic_string_view< char > string_view
A view to a contiguous sequence of chars.
Definition: string_view.h:623
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
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
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
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
Declarations of string utility functions for the General Utility Library.
Provides a gul14::string_view that is fully compatible with C++17's std::string_view.