Comment

Comment by zbuf

Interesting to see the implementation is basically a two-pass process: strlen() to count the source string, followed by a memcpy().

My intuition would be to give some importance to not looping on the source string radically beyond the length of the destination buffer.

https://sourceware.org/git/?p=glibc.git;a=blob;f=string/strl...

parent zbuf 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton