Do you want to copy and truncate, or just copy?
Within that, do you want to manage your own allocation, or do you want that abstracted?
There's too many decision points and tradeoffs to just neatly hide behind a single "one true function" for copying C strings.
As well as reaching for the %ms format for scanf for reading input.
For buffers, I use memcpy and length tracking. Any other approach seems like unnecessary headache. Or maybe modern hardware has spoiled me?
Do you want to copy and truncate, or just copy?
Within that, do you want to manage your own allocation, or do you want that abstracted?
There's too many decision points and tradeoffs to just neatly hide behind a single "one true function" for copying C strings.