General Utility Library for C++14  2.7
replace.h
Go to the documentation of this file.
1 
23 #ifndef GUL14_REPLACE_H_
24 #define GUL14_REPLACE_H_
25 
26 #include <string>
27 #include "gul14/internal.h"
28 #include "gul14/string_view.h"
29 
30 namespace gul14 {
31 
42 GUL_EXPORT
43 std::string replace(string_view haystack, string_view needle, string_view hammer);
44 
57 GUL_EXPORT
58 std::string& replace_inplace(std::string& haystack, string_view needle, string_view hammer);
59 
60 } // namespace gul14
61 
62 #endif
63 
64 /* vim:set noexpandtab softtabstop=4 tabstop=4 shiftwidth=4 textwidth=90 cindent: */
gul14::replace_inplace
GUL_EXPORT std::string & replace_inplace(std::string &haystack, string_view needle, string_view hammer)
Replace all occurrences of a string within another string in-place.
Definition: replace.cc:53
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
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.
replace.h
Declarations of replace(), replace_inplace().
gul14::replace
GUL_EXPORT std::string replace(string_view haystack, string_view needle, string_view hammer)
Replace all occurrences of a string within another string, returning the result as a std::string.
Definition: replace.cc:29
gul14
Namespace gul14 contains all functions and classes of the General Utility Library.
Definition: doxygen.h:26