]> git.lyx.org Git - features.git/blob - src/support/tostr.C
Replace LString.h with support/std_string.h,
[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 "support/std_sstream.h"
14 #include "support/std_string.h"
15
16
17 string const tostr(bool b)
18 {
19         return (b ? "true" : "false");
20 }
21
22
23 string const tostr(unsigned int i)
24 {
25         ostringstream os;
26         os << i;
27         return STRCONV(os.str());
28 }
29
30
31 string const tostr(long int i)
32 {
33         ostringstream os;
34         os << i;
35         return STRCONV(os.str());
36 }
37
38
39 string const tostr(double d)
40 {
41         ostringstream os;
42         os << d;
43         return STRCONV(os.str());
44 }
45
46
47 string const tostr(int i)
48 {
49         ostringstream os;
50         os << i;
51         return STRCONV(os.str());
52 }
53
54
55 string const tostr(string const & s)
56 {
57         return s;
58 }
59