Subject: Re: strncpy vs. strncat
To: Andrew Brown <>
From: Assar Westerlund <>
List: tech-userlevel
Date: 02/13/1999 11:54:03
Andrew Brown <> writes:
> wouldn't strncat be much better off if it thought the same way as
> strncpy?

The other way around, but they are defined by ANSI/ISO so there's not
much to do about it.  The other difference is that strncpy fills the
destination with zeros.  Usually that's not what you want.  I tend to
use snprintf/asprintf and str{cpy,cat}_truncate that have the
semantics I would have liked strn{cpy,cat} to have.  You can find the
later two functions in