generate, libi2ncommon: (tomj) fix custom spam folders with umlauts (#1106)
[libi2ncommon] / src / stringfunc.hxx
1 /***************************************************************************
2  *   Copyright (C) 2004 by Gerd v. Egidy                                   *
3  *   info@intra2net.com                                                    *
4  *                                                                         *
5  ***************************************************************************/
6
7 #ifndef __STRINGFUNC_HXX
8 #define __STRINGFUNC_HXX
9
10 #include <string>
11
12 std::string to_lower (const std::string &src);
13 std::string to_upper (const std::string &src);
14
15 std::string nice_unit_format (int input);
16
17 bool replace_all(std::string &base, const std::string *ist, const std::string *soll);
18 bool replace_all(std::string &base, const char *ist, const char *soll);
19 bool replace_all(std::string &base, const char *ist, const std::string *soll);
20 bool replace_all(std::string &base, const std::string &ist, const char *soll);
21 bool replace_all(std::string &base, const std::string &ist, const std::string &soll);
22
23 std::string iso_to_utf8(const std::string& isostring);
24 std::string utf8_to_iso(const std::string& utf8string);
25 std::string utf7imap_to_utf8(const std::string &utf7imapstring);
26 std::string utf8_to_utf7imap(const std::string &utf8string);
27
28 std::string strip_html_tags(const std::string &input);
29 std::string smart_html_entities(const std::string &input);
30 std::string html_entities(std::string str);
31
32 std::string escape(const std::string &s);
33
34 std::string descape(const std::string &s, int startpos, int &endpos);
35 inline std::string descape(const std::string &s)
36 {
37     int endpos;
38     return descape(s,0,endpos);
39 }
40
41 std::string escape_shellarg(const std::string &input);
42
43 #endif