Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ttrdc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!mgnetp!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.lang.c Subject: Re: Re: Need strnlen(). Message-ID: <585@ttrdc.UUCP> Date: Mon, 18-Nov-85 19:18:49 EST Article-I.D.: ttrdc.585 Posted: Mon Nov 18 19:18:49 1985 Date-Received: Tue, 19-Nov-85 05:51:47 EST References: <207@a.sei.cmu.edu> <562@scc.UUCP> Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 41 In article <562@scc.UUCP>, steiny@scc.UUCP (Don Steiny) writes: >** > > Yikes! Too much talk, I have 25 seconds to spare, here: > Yikes! Needs a brushup, I have 25 seconds to spare, here: [:-)] > int strnlen(str,len) ^^^ > char *str; int len; ^^^^^^^^ > { > register char *s; ^^^^ > > for(s=str;*s && s-str ; > return(s-str); > } > /* Did I get it right, Guy? Huh? Huh??? :-) */ > >-- >scc!steiny >Don Steiny @ Don Steiny Software >109 Torrey Pine Terrace >Santa Cruz, Calif. 95060 >(408) 425-0382 -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!ihnp4!ttrdc!levy