2.1.6.21 int_to_fixed_str


Description

get a string with leading spaces filled with 0

Syntax

void int_to_fixed_str( int nVal, int nWidth, LPSTR lpszBuff )

Parameters

nVal
[input] integer value to be converted to string
nWidth
[input] width of the string
lpszBuff
[output] buffer for the output string, must have length of at least nWidth + 1

Return

Examples

EX1

void int_to_fixed_str_ex1()
{
	char lpszBuff[10];
	int n = 12345;
	int_to_fixed_str(n, 10, lpszBuff);
	out_str(lpszBuff);
}

Remark

See Also

Header to Include

origin.h

Reference