It's interesting to read the sources[1] of lots of djb's[2] code, as he often works around problems with (or perhaps dislikes the style of) standard libraries by re-implementing parts.
[1] https://github.com/abh/djbdns/blob/master/str_len.c [2] http://cr.yp.to/djb.html