No one is actively taking your gasoline driven car away. If you really need it, keep it. But for the largest part of the population, it might make sense to drive an electric car most of the year, and only for the few long trips into sparsely populated regions, they can rent a gasoline powered one.
Your argument is akin to arguing that cars are not usable for anybody, because there are some people living on small islands who need a boat to get somewhere else, or because once in a while, you need to go by airplane, because it would take too long to drive from New York City to Seattle. Yes, there are special cases, when a car is not a good solution. For those cases, we have other solutions. But that doesn't mean that we have to abandon cars. People living on small islands will not be frequent car customers. So what?
The same can be said for electric cars. Yes, there are special cases where they aren't a good solution. But for most people in most cases, they are. And for special needs, there are special transportation means you can use -- be it a gasoline powered car, a train, an airplane, a boat or a bicycle. It doesn't mean that you have to own all of them.
If you want to take a trip between San Francisco and Los Angeles you take a plane, not a train.
Well, duh. That's because the train currently takes all day.
The food in the buffet is inedible - I wouldn't feed it to hogs.
That's funny... that's exactly what they do.
I saw a segment on some TV show a few years ago that featured a guy who collects the abundant leftover buffet food from Las Vegas hotels, mixes it all together, and then delivers it to hog farms. The animals did seem to be enjoying it quite a bit.
The Dutch Railways are now completely wind powered as of Jan 1 2017. Apparently they don't need baseload power plants.
How would Trump get his money transferred then?
Operatives exchange briefcases full of cash for envelopes of IOUs at Checkpoint Charlie.
So you've avoided the need for another function by requiring the user to add *two* separate manual fixups to each call of the most common use case. Do you realize how stupid that is?
Of course, the best practice is to forbid the use of strncpy at all in coding standards, which then involves what you said you wanted to avoid: writing your own function.
I'm not the only one to point this out. Here's the discussion of strncpy from Wikipedia:
Despite the well-established need to replace strcat and strcpy with functions that do not allow buffer overflows, no accepted standard has arisen. This is partly due to the mistaken belief by many C programmers that strncat and strncpy have the desired behavior; however, neither function was designed for this (they were intended to manipulate null-padded fixed-size string buffers, a data format less commonly used in modern software), and the behavior and arguments are non-intuitive and often written incorrectly even by expert programmers.
As I said, "sound practice" involves not using that damned function at all. Why do you defend the design of an API that requires you to add an extra line of mitigation code every time you use it?. And why would you accept the performance hit of the extraneous zero padding? It's most likely worse than any of the bounds checking you're so worried about. But an actual "real programmer" would know that.
The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it. -- E. Hubbard