chrSizetoc

Encode a size_t value as a string

Description:

Encode a size_t value as a (decimal) character string, using as concise a format as possible, and return the number of characters used. In the event of an error, " s will be written into to the string.

Invocation

void chrSizetoc( size_t value, char string, size_t string_length, size_t nchar )

Parameters :

value
The value to be encoded.
string
Pointer to an array in which to return a null terminated string holding the string into which the integer value is encoded.
string_length
The maximum length of the supplied string array. This should include room for the terminating null.
nchar
Returned holding the field width used in encoding the value.