The OENumberToString functions convert numerical values into ASCII strings.
bool OENumberToString(short value, std::string &str, int base = 10) bool OENumberToString(unsigned short value, std::string &str, int base = 10) bool OENumberToString(int value, std::string &str, int base = 10) bool OENumberToString(unsigned int value, std::string &str, int base = 10) bool OENumberToString(OELongLong value, std::string &str, int base = 10) bool OENumberToString(OEULongLong value, std::string &str, int base = 10) bool OENumberToString(double value, std::string &str, char form = 'f', int prec = 6)
These functions convert the specified value
into an ASCII formatted
string in the specified base
. The str
parameter is assigned the
value of the resulting string and the functions returns whether or not the
conversion was successful. The prec
parameter specifies the precision
with which a floating-point value should be converted to a string. The
form
parameter specifies the format in which the floating-point value
should be displayed. Acceptable values for this parameter are: f, F, e, E, g,
and G. Specifying any of these values is equivalent to using that value after
the percent sign in a printf statement.
std::string OENumberToString(short value, int base = 10) std::string OENumberToString(unsigned short value, int base = 10) std::string OENumberToString(int value, int base = 10) std::string OENumberToString(unsigned int value, int base = 10) std::string OENumberToString(OELongLong number, int base = 10) std::string OENumberToString(OEULongLong number, int base = 10) std::string OENumberToString(double number, char f = 'f', int prec = 6)
These functions convert the specified value
into an ASCII formatted
string in the specified base
and then return the resulting string. If
the conversion failed, an empty string will be returned. The prec
parameter specifies the precision with which a floating-point value should be
converted to a string. The form
parameter specifies the format in which
the floating-point value should be displayed. Acceptable values for this
parameter are: f, F, e, E, g, and G. Specifying any of these values is
equivalent to using that value after the percent sign in a printf statement.