SysTutorials

Man Pages › Section 3

strfromd(3)

strfromd, strfromf, strfroml – convert a floating-point value into a string

Synopsis

#include <stdlib.h>

int strfromd(char *restrict str, size_t n, const char *restrict format, double fp); int strfromf(char *restrict str, size_t n, const char *restrict format, float fp); int strfroml(char *restrict str, size_t n, const char *restrict format, long double fp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)): strfromd(), strfromf(), strfroml():

__STDC_WANT_IEC_60559_BFP_EXT__

Description

These functions convert a floating-point value, fp, into a string of characters, str, with a configurable format string. At most n characters are stored into str. The terminating null byte (‘