]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/std-string.hh
Merge master into nested-bookparts
[lilypond.git] / flower / include / std-string.hh
1 /*
2   std-string.hh -- declare string
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2006--2007 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #ifndef STD_STRING_HH
10 #define STD_STRING_HH
11  
12 #include "compare.hh"
13 #include "flower-proto.hh"
14
15 #if 0
16 /*
17   leads to dubious crashes - libstdc++  bug?
18  */
19 #ifndef NDEBUG
20 #define _GLIBCXX_DEBUG 1
21 #endif
22 #endif
23
24 #include <string>
25
26 using namespace std;
27
28 typedef size_t ssize;
29 #define NPOS string::npos
30
31 string to_string (string s);
32 string to_string (char c, int n=1);
33 string to_string (int i, char const *format=0);
34 string to_string (double f, char const *format=0);
35 string to_string (long);
36 string to_string (long unsigned);
37 string to_string (I64, char const *format=0);
38 string to_string (unsigned);
39 string to_string (bool b);
40 string to_string (char const *format, ...)
41   __attribute__ ((format (printf, 1, 2)));
42   
43 string &replace_all (string* str, string const &find, string const &replace);
44 string &replace_all (string* str, char find, char replace);
45 char *string_copy (string s);
46
47 int string_compare (string const &, string const &);
48
49 INSTANTIATE_COMPARE (string const &, string_compare);
50
51
52 #endif /* STD_STRING_HH */