2 ms·
Oops, you're right. I was going to reach for `strcspn` but then realized it doesn't work for null bytes. Huh. OP is right, there is no good function for this i
by junon 5y ago
Oops, you're right. I was going to reach for `strcspn` but then realized it doesn't work for null bytes.
Huh. OP is right, there is no good function for this in the standard library.