Source for "integer to ascii" and multiple file search-n-replace

John Gordon gordon at osiris.cso.uiuc.edu
Tue Nov 20 12:41:10 AEST 1990


mpledger at cti1.UUCP (Mark Pledger) writes:

>I'm looking for a function that can convert an integer to an ascii string.
>Microsoft has a function in its library called itoa() where you can specify
>the radix result used in the ascii string.  I just want to convert integers
>though.  I am looking for a fast implementation, without resorting to scanf()
>or print() type functions.

	Assuming: int integer;
	          char buffer[100];

		  sprintf(buffer, "%d", integer);  will do the job nicely.



More information about the Comp.lang.c mailing list