Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!think.com!rpi!crdgw1!camelback!volpe From: volpe@camelback.crd.ge.com (Christopher R Volpe) Newsgroups: alt.hackers Subject: Re: Useful string function Message-ID: <20919@crdgw1.crd.ge.com> Date: 26 Jun 91 15:43:48 GMT References: <27187@ttidca.TTI.COM> Sender: news@crdgw1.crd.ge.com Reply-To: volpe@camelback.crd.ge.com (Christopher R Volpe) Lines: 19 Approved: Your mother In article <27187@ttidca.TTI.COM>, hollombe@ttidca.TTI.COM (The Polymath) writes: |>Here's a simple minor hack I threw together. It's proved so useful, I'm |>amazed it isn't part of the standard Unix libraries. That's because it's part of the standard C library, and it's called "strstr". Check the man page. |> (C'mon. Even BASIC |>does this)! Anyway, it's a function that finds a substring within a |>string and returns its starting location or -1 if the substring isn't |>there. I'm sure you can think of many variations and improvements. This |>version does what I need it to. Enjoy. ================== Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com