integer to string function (itoa())

Henry Spencer henry at zoo.toronto.edu
Sun Jul 15 09:26:06 AEST 1990


In article <1990Jul14.084734.29071 at agate.berkeley.edu> dankg at headcrash.Berkeley.EDU (Dan KoGai) writes:
>... Wierd thing is that atoi() exists for scanf but itoa()
>doesn't seem to exist in C standard library.  Does anyone know why?

The scanf family is a bit of a botch that doesn't really give you enough
control to cope with real-life input.  The printf family does not have
this weakness, so there is much less need to bypass it.

There used to be an itoa() function, long ago, if my memory isn't failing
me.  Once sprintf arrived, nobody ever bothered to use itoa().  It was
seldom performance-critical, and everyone already knew how to use the
printf family.
-- 
NFS:  all the nice semantics of MSDOS, | Henry Spencer at U of Toronto Zoology
and its performance and security too.  |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list