Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!usc!rpi!think.com!linus!philabs!ttidca!hollombe From: hollombe@ttidca.TTI.COM (The Polymath) Newsgroups: alt.hackers Subject: Re: Useful string function Message-ID: <27212@ttidca.TTI.COM> Date: 26 Jun 91 19:15:13 GMT References: <27187@ttidca.TTI.COM> Organization: The Cat Factory Lines: 22 Approved: yes In article <27187@ttidca.TTI.COM> hollombe@ttidca.TTI.COM (The Polymath) writes: }Here's a simple minor hack ... }... a function that finds a substring within a }string and returns its starting location or -1 if the substring isn't }there. ... My thanks to all who wrote to tell me about the strstr(3), or equivalent, function in their libraries. The version of SysV we use doesn't include it nor anything like it. Neither does our 4.3 bsd. To all others in my position I say again, enjoy. To those who have strstr(3) available to them, never mind (-: (unless you need a PD version). (And to those who think they can improve on my code -- go for it. I make no claim perfection). -- The Polymath (aka: Jerry Hollombe, M.A., CDP, aka: hollombe@ttidca.tti.com) Head Robot Wrangler at Citicorp Turn the rascals out! 3100 Ocean Park Blvd. (213) 450-9111, x2483 No incumbents in '92! Santa Monica, CA 90405 {rutgers|pyramid|philabs|psivax}!ttidca!hollombe