replicode
string_utils.h
Go to the documentation of this file.
1 #if !defined(STRING_UTILS__INCLUDED_)
2 #define STRING_UTILS__INCLUDED_
3 
4 #include <string>
5 
6 namespace string_utils
7 {
8 
9 int StartsWith(const std::string &s, const std::string &str);
10 
11 int EndsWith(const std::string &s, const std::string &str);
12 
13 void MakeUpper(std::string &str);
14 
15 void MakeLower(std::string &str);
16 
17 void Trim(std::string& str, const char* chars2remove = " ");
18 
19 void TrimLeft(std::string& str, const char* chars2remove = " ");
20 
21 void TrimRight(std::string& str, const char* chars2remove = " ");
22 
23 void ReplaceLeading(std::string& str, const char* chars2replace, char c);
24 
25 std::string Int2String(int i);
26 }
27 
28 #endif
void ReplaceLeading(std::string &str, const char *chars2replace, char c)
Definition: string_utils.cpp:68
std::string Int2String(int i)
Definition: string_utils.cpp:84
void Trim(std::string &str, const char *chars2remove)
Definition: string_utils.cpp:35
void TrimRight(std::string &str, const char *chars2remove)
Definition: string_utils.cpp:54
void MakeUpper(std::string &str)
Definition: string_utils.cpp:25
void TrimLeft(std::string &str, const char *chars2remove)
Definition: string_utils.cpp:41
void MakeLower(std::string &str)
Definition: string_utils.cpp:30
int EndsWith(const std::string &s, const std::string &str)
Definition: string_utils.cpp:17
int StartsWith(const std::string &s, const std::string &str)
Definition: string_utils.cpp:9
Definition: string_utils.cpp:7