String Fanaticism

Leslie Mikesell les at chinet.UUCP
Sun Apr 17 04:35:39 AEST 1988


In article <7697 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>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.

Or strtok() where subsequent tokens are not parsed by the same function
as the first one in a string.

>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?

Not to mention the additional unecessary code space when shared libraries
are available.  I'm surprised that this issue was not raised in the
recent discussion knocking the use of [sf]printf().  Is no one using the
shared libraries on SysVr3 and friends?


  Les Mikesell
                      ...ihnp4!chinet!les



More information about the Comp.lang.c mailing list