#include <cstring>
#include <cstdio>
+using namespace std;
#include "libc-extension.hh"
#include "rational.hh"
#include "std-vector.hh"
-using std::string;
-
/**
A safe length for stringconversion buffers.
string
String_convert::precision_string (double x, int n)
{
- string format = "%." + ::to_string (std::max (0, n - 1)) + "e";
+ string format = "%." + ::to_string (max (0, n - 1)) + "e";
string str = double_string (abs (x), format.c_str ());
int exp = dec2int (str.substr (str.length () - 3));
string
String_convert::pad_to (const string &s, size_t n)
{
- return s + string (std::max (int (n - s.length ()), 0), ' ');
+ return s + string (max (int (n - s.length ()), 0), ' ');
}
string