]> git.lyx.org Git - features.git/blob - src/support/tostr.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / support / tostr.C
1 /**
2  * \file tostr.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include <sstream>
14
15 using std::string;
16 using std::ostringstream;
17
18
19 string const tostr(bool b)
20 {
21         return (b ? "true" : "false");
22 }
23
24
25 string const tostr(unsigned int i)
26 {
27         ostringstream os;
28         os << i;
29         return os.str();
30 }
31
32
33 string const tostr(long int i)
34 {
35         ostringstream os;
36         os << i;
37         return os.str();
38 }
39
40
41 string const tostr(double d)
42 {
43         ostringstream os;
44         os << d;
45         return os.str();
46 }
47
48
49 string const tostr(int i)
50 {
51         ostringstream os;
52         os << i;
53         return os.str();
54 }
55
56
57 string const tostr(string const & s)
58 {
59         return s;
60 }
61
62
63 string const tostr(long unsigned int i)
64 {
65         ostringstream os;
66         os << i;
67         return os.str();
68 }