Need strnlen().

Don Steiny steiny at scc.UUCP
Mon Nov 18 15:49:13 AEST 1985


**

	Yikes! Too much talk, I have 25 seconds to spare, here: 

	strnlen(str,len)
	char *str;
	{
		register *s;

		for(s=str;*s && (int) s-str<len;s++)
			;
		return((int) s-str);
	}
	

-- 
scc!steiny
Don Steiny @ Don Steiny Software 
109 Torrey Pine Terrace
Santa Cruz, Calif. 95060
(408) 425-0382



More information about the Comp.lang.c mailing list