From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA22586; Thu, 24 Jun 2004 17:48:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA22036 for ; Thu, 24 Jun 2004 17:48:11 +0200 (MET DST) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5OFm9EV006055 for ; Thu, 24 Jun 2004 17:48:10 +0200 Received: (qmail 26980 invoked from network); 24 Jun 2004 15:48:08 -0000 Received: from dialup-4.242.33.190.dial1.seattle1.level3.net (HELO sherlock.localdomain) (shawnw@[4.242.33.190]) (envelope-sender ) by mail3.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 24 Jun 2004 15:48:08 -0000 Received: by sherlock.localdomain (Postfix, from userid 502) id CF61BFD15; Thu, 24 Jun 2004 08:51:21 -0700 (PDT) Date: Thu, 24 Jun 2004 08:51:21 -0700 From: Shawn Wagner To: caml-list@inria.fr Subject: Re: [Caml-list] Substring search on an array of strings Message-ID: <20040624155121.GB595@speakeasy.org> Mail-Followup-To: caml-list@inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Miltered: at nez-perce with ID 40DAF7B9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; shawnw:01 caml-list:01 2004:99 pons:01 workarounds:01 raevnos:01 pennmush:01 shawnw:01 fernandez:01 caml:01 speakeasy:01 speakeasy:01 0200,:01 olivier:02 match:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Jun 24, 2004 at 09:52:37AM +0200, Diego Olivier Fernandez Pons wrote: > Bonjour, > > Caml Str library does not seem to provide a function allowing to match > efficently a string in a array of strings. > > I was wondering if there were already known algorithms for this before > I try the workarounds I had in mind : Do you want to find out if one of the strings in the array equals some other string, or if that other string appears as a substring in one of the array's strings? Either way, annexlib has the needed functions: http://raevnos.pennmush.org/code/annexlib/ -- Shawn Wagner shawnw@speakeasy.org ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners