String Fanaticism

Doug Gwyn gwyn at brl-smoke.ARPA
Sat Apr 16 07:41:20 AEST 1988


In article <77200033 at uiucdcsp> gillies at uiucdcsp.cs.uiuc.edu writes:
>Given a choice, I'd make STRSPN, STRCSPN, STRPBRK, STRRPBRK, STRTOK,
>and STRSTR bite the dust.  C has switch statements and pointers in the
>language to accomplish these things efficiently.

Ok, show me how you can use switch statements and pointers to implement
strstr() efficiently.

The majority of the str*() functions have been in use for 10 years or
more in a vast number of applications.  Apparently you think each
application should have to reinvent these particular wheels.  What
do you think libraries are for?



More information about the Comp.lang.c mailing list