Date: Mon, 22 Nov 1999 13:11:45 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Morpheus cc: djgpp AT delorie DOT com Subject: Re: indexOf function In-Reply-To: <81au7i$p1f@hermes.acs.unt.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 22 Nov 1999, Morpheus wrote: > Does the standard library have an indexOf function for char pointers similar > to a static version of java's java.lang.String.indexOf()? > > As in: > /* Returns the index of lookFor in lookIn if lookFor is found in lookIn; > * else returns -1. The Standard C library includes a function called `strstr' which does the same, except that it returns a pointer to the substring if it finds one, NULL if not.