ui, arniesetup, libi2ncommon: (tomj) po file is now in utf8 format. make use of new...
[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
27 std::string strip_html_tags(const std::string &input);
28 std::string smart_html_entities(const std::string &input);
29 std::string html_entities(std::string str);
30
31 std::string escape(const std::string &s);
32
33 std::string descape(const std::string &s, int startpos, int &endpos);
34 inline std::string descape(const std::string &s)
35 {
36     int endpos;
37     return descape(s,0,endpos);
38 }
39
40 std::string escape_shellarg(const std::string &input);
41
42 #endif