Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

31 righe
523 B

#include <string.h>
#include "double-conversion.h"
using namespace double_conversion;
#ifdef __cplusplus
extern "C" {
#endif
// Returns the length of the string
int
double_to_shortest(char *buf, size_t size, double val)
{
int len = -1;
StringBuilder builder(buf, size);
const DoubleToStringConverter& dc =
DoubleToStringConverter::EcmaScriptConverter();
dc.ToShortest(val, &builder);
len = builder.position();
buf = builder.Finalize();
return len;
}
#ifdef __cplusplus
}
#endif