blob: a906e5539170e79baa68e7da944394152f5e4ce8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* Util.h
*
* Created on: 02.04.2011
* Author: sven
*/
#ifndef UTIL_H_
#define UTIL_H_
#ifndef _GLIBCXX_STRING
#include <string>
#endif
#ifndef _GLIBCXX_SSTREAM
#include <sstream>
#endif
class Util
{
public:
static std::string ToString(const long double& val)
{
std::ostringstream ssIn;
ssIn.precision(12);
ssIn << val;
std::string res = ssIn.str();
return res;
}
};
#endif /* UTIL_H_ */
|