chrItoc

Encode an integer value as a string

Description:

Encode an integer 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 chrItoc( int ivalue, char ∗string, size_t string_length, size_t ∗nchar )

Parameters :

ivalue
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.