12 ms·
> Sadly there is no standard replacement that is widely accepted. True, but practically: when having access to BSD extensions, strl* are used. If only C standa
by grive 8y ago
> Sadly there is no standard replacement that is widely accepted.
True, but practically: when having access to BSD extensions, strl* are used. If only C standard is available, snprintf is preferred. I have seen C libs that will check for strl* availability, and if not, reimplement them using snprintf.
So for portability, snprintf is the way to go. For correctness, and pushing for their extended use, strl* is nice.