← Back to context

Comment by parasti

8 days ago

Starting with "The C string library" made me instantly tune out. C has a standard library, which has some string-related functions. There is no "C string library".

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.

      1 reply →

    • 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.

      4 replies →