comp.lang.ada
 help / color / mirror / Atom feed
From: James Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: Ada String Issue: String within Strings
Date: Fri, 01 Jun 2001 14:04:19 GMT
Date: 2001-06-01T14:04:19+00:00	[thread overview]
Message-ID: <3B17A17C.A4A60B54@worldnet.att.net> (raw)
In-Reply-To: 4713a80b.0106010531.7f6f4da8@posting.google.com

Xcalibre wrote:
> 
> Just a little hello and little comment that I've enjoyed reading
> through this newsgroup.
> 
> My problem is this:  I am Get_Line-ing from a file... what I want to
> do is check that line of text for a particular phrase given (not just
> a word).  I've tried using Index() and I get an Error that says...
> 
> extract.adb:73:66: array type required in indexed component
> 
(Code Deleted)
> 
> Is what I am doing the right idea or is there a different built in
> function that will do what C does in comparing the text and returning
> the location of where it starts?
> 

Look at the generic package Ada.Strings.Bounded. It includes
several search functions for substrings within strings.

These functions are, at an abstract level, similar to the C
function strstr().

Jim Rogers
Colorado Springs, Colorado USA



  parent reply	other threads:[~2001-06-01 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-01 13:31 Ada String Issue: String within Strings Xcalibre
2001-06-01 14:04 ` Mark Johnson
2001-06-01 17:43   ` tmoran
2001-06-01 14:04 ` James Rogers [this message]
2001-06-01 14:43 ` Ted Dennison
2001-06-01 15:07   ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox