← Back to context

Comment by NackerHughes

8 days ago

string.h

It's a header file not a library.

  • Define library. Surely a library is a collection of functions, not a collection of files, so you could have a single file library. I don't know at what size a collection of functions becomes a library, but I don't think anyone does.

    Ultimately this file is supposed to be the one stop shop for all string related needs, so in what sense isn't that a library.

  • It's not a header file, it's just a header, strictly speaking: the standard explicitly allows it to not be an actual file, and indeed there are implementations that don't have standard headers available as actual on-disk files. And, also strictly speaking, it should be <string.h>. You know, if we're being pedantic.

    • My point isn't about that, though. My point is if you start a blog post with "The C string library", my confidence in your ability to discuss the topic is shot before I even finish reading the sentence.

      3 replies →