A question (with apologies)

Bill Poser poser at csli.Stanford.EDU
Sun Nov 26 06:43:51 AEST 1989


(Regarding query about string handling functions in C.)

The standard library contains functions for searching and concatenation
into space provided by the caller, but not for automatic allocation.
Most such things are easily written.

itoa is not a standard library function, but is easily emulated by:

	sprintf(buf,"%d",foo)

K&R give a version of itoa that one can easily type in. I have written
a modified version of this, that runs somewhat faster, which I will send
by mail. However, at least in my experience even a fast itoa is only around
20% faster than using sprintf as above, so it may not be worth the bother.


							Bill Poser



More information about the Comp.lang.c mailing list