Path: utzoo!utgpu!water!watmath!clyde!att-cb!att-ih!ihnp4!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: String Fanaticism Message-ID: <4830@chinet.UUCP> Date: 16 Apr 88 18:35:39 GMT References: <77200033@uiucdcsp> <7697@brl-smoke.ARPA> Reply-To: les@chinet.UUCP (Leslie Mikesell) Distribution: na Organization: Chinet - Public Access Unix Lines: 24 In article <7697@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <77200033@uiucdcsp> gillies@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