]> git.lyx.org Git - lyx.git/blob - src/support/tostr.C
The "I want this in now" patch.
[lyx.git] / src / support / tostr.C
1 #include <config.h>
2  
3 #include "Lsstream.h"
4 #include "LString.h"
5
6
7 string const tostr(bool b)
8 {
9         return (b ? "true" : "false");
10 }
11
12
13 string const tostr(unsigned int i)
14 {
15         ostringstream os;
16         os << i;
17         return STRCONV(os.str());
18 }
19
20
21 string const tostr(long int i)
22 {
23         ostringstream os;
24         os << i;
25         return STRCONV(os.str());
26 }
27
28
29 string const tostr(double d)
30 {
31         ostringstream os;
32         os << d;
33         return STRCONV(os.str());
34 }
35
36
37 string const tostr(int i)
38 {
39         ostringstream os;
40         os << i;
41         return STRCONV(os.str());
42 }
43
44
45 string const tostr(string const & s)
46 {
47         return s;
48 }
49