mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
string.h
Go to the documentation of this file.
1 #ifndef MF_UTILITY_STRING_H_
2 #define MF_UTILITY_STRING_H_
3 
4 #include <string>
5 #include <vector>
6 
7 namespace mf {
8 
9 std::string file_name_extension(const std::string& filename);
10 std::string replace_file_name_extension(const std::string& filename, const std::string& ext);
11 std::string remove_file_name_extension(const std::string& filename);
12 
13 template<typename T> std::string to_string(const T&);
14 template<typename T> T from_string(const std::string&);
15 
16 template<typename It> std::string to_string(It begin, It end, const std::string& separator = ", ");
17 
18 std::vector<std::string> explode(char separator, const std::string&);
19 std::string implode(char separator, const std::vector<std::string>&);
20 
21 template<typename T>
22 std::vector<T> explode_from_string(char separator, const std::string&);
23 
24 template<typename T>
25 std::string implode_to_string(char separator, const std::vector<T>&);
26 
27 std::string to_lower(const std::string&);
28 std::string to_upper(const std::string&);
29 
30 }
31 
32 #include "string.tcc"
33 
34 #endif
std::string to_string(const T &)
Definition: string.tcc:7
std::string remove_file_name_extension(const std::string &filename)
std::string to_lower(const std::string &s_orig)
Definition: string.cc:35
std::string to_upper(const std::string &s_orig)
Definition: string.cc:42
std::vector< T > explode_from_string(char separator, const std::string &)
Definition: string.tcc:35
std::string implode_to_string(char separator, const std::vector< T > &)
Definition: string.tcc:45
T from_string(const std::string &)
Definition: string.tcc:25
std::string implode(char separator, const std::vector< std::string > &vec)
Definition: string.cc:24
std::string file_name_extension(const std::string &filename)
std::vector< std::string > explode(char separator, const std::string &str)
Definition: string.cc:8
std::string replace_file_name_extension(const std::string &filename, const std::string &ext)