]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/std-string.hh
Issue 4550 (2/2) Avoid "using namespace std;" in included files
[lilypond.git] / flower / include / std-string.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 2006--2015 Jan Nieuwenhuizen <janneke@gnu.org>
5
6   LilyPond is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   LilyPond is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef STD_STRING_HH
21 #define STD_STRING_HH
22
23 #include "flower-proto.hh"
24
25 #if 0
26 /*
27   leads to dubious crashes - libstdc++  bug?
28  */
29 #ifdef DEBUG
30 #define _GLIBCXX_DEBUG 1
31 #endif
32 #endif
33
34 #include <string>
35
36
37 typedef size_t ssize;
38 #define NPOS std::string::npos
39
40 std::string to_string (const std::string&);
41 std::string to_string (char c, int n = 1);
42 std::string to_string (int i, char const *format = 0);
43 std::string to_string (double f, char const *format = 0);
44 std::string to_string (long);
45 std::string to_string (long unsigned);
46 std::string to_string (I64, char const *format = 0);
47 std::string to_string (unsigned);
48 std::string to_string (bool b);
49 std::string to_string (char const *format, ...)
50 __attribute__ ((format (printf, 1, 2)));
51
52 std::string &replace_all (std::string *str, std::string const &find, std::string const &replace);
53 std::string &replace_all (std::string *str, char find, char replace);
54 char *string_copy (const std::string &s);
55
56 #endif /* STD_STRING_HH */