C-Extensions / C API functions |
Converts a decimal value to a string value.
char *decfcvt(dec_t *np, mint ndigit, mint *decpt, mint *sign);
Specifying the number of digits to the right of the decimal point with the ndigit parameter.
A negative or zero value fordecpt means to the left of the returned digits.
If the sign of the result is negative, sign is nonzero; otherwise, sign is zero.
This function returns a pointer to the result string. This string is temporary and has to be copied into your own string buffer.