On Thu, May 11, 2017 at 5:22 PM, Karl Williamson <public@khwilliamson.com> wrote: > memSTARTS_WITHs > Test if the string buffer "s1" with length "l1" begins with the > substring given by the string literal "s2", returning non-zero > if > so (including if the two are identical); zero otherwise. The > comparison does not include the final "NUL" of "s2". "s1" does > not > have to be "NUL"-terminated, > > bool memSTARTS_WITHs(char* s1, STRLEN l1, char* s2) I don't have to use these and don't really care, but just a question: Is there a reason for why the prototype for the the mem* functions doesn't also pass the STRLEN for the needle as well as the haystack? Right now the interface only allows the haystack not the needle to contain \0, which seems like a needless arbitrary limitation for something that's essentially a fancy strstr() & memmem(). I.e. you have feature-parity with strstr() (and extra features like "begins with?"), but not with memmem().Thread Previous | Thread Next