I feel like more idiomatic iterating through a string tends to loop on src not being a terminator.
while (*src) { *dst = *src; ++src; ++dst; } *dst = '\0';
I feel like more idiomatic iterating through a string tends to loop on src not being a terminator.
I feel like this is idiomatic C but needlessly verbose. Most people would combine the increment with the assignment. And most people would recognize putting it in the while condition as a common strcpy.