9
|
1 #ifndef __core__strings_h
|
|
2 #define __core__strings_h
|
15
|
3
|
9
|
4 #include <string>
|
|
5 #include <vector>
|
15
|
6
|
64
|
7 class QString;
|
|
8
|
10
|
9 namespace Strings {
|
15
|
10
|
9
|
11 /* Implode function: takes a vector of strings and turns it
|
|
12 into a string, separated by delimiters. */
|
|
13 std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter);
|
|
14
|
|
15 /* Substring removal functions */
|
|
16 std::string ReplaceAll(const std::string& string, const std::string& find, const std::string& replace);
|
|
17 std::string SanitizeLineEndings(const std::string& string);
|
|
18 std::string RemoveHtmlTags(const std::string& string);
|
|
19
|
|
20 /* stupid HTML bullshit */
|
|
21 std::string TextifySynopsis(const std::string& string);
|
15
|
22
|
|
23 std::string ToUpper(const std::string& string);
|
|
24 std::string ToLower(const std::string& string);
|
|
25
|
62
|
26 std::wstring ToWstring(const std::string& string);
|
64
|
27 std::wstring ToWstring(const QString& string);
|
62
|
28 std::string ToUtf8String(const std::wstring& wstring);
|
64
|
29 std::string ToUtf8String(const QString& string);
|
|
30 QString ToQString(const std::string& string);
|
|
31 QString ToQString(const std::wstring& wstring);
|
62
|
32
|
85
|
33 }; // namespace Strings
|
|
34
|
9
|
35 #endif // __core__strings_h |