From: Mark Biggar <mark.a.biggar@attbi.com>
Subject: Re: Ada Strings Libraries for the clueless.
Date: Tue, 05 Nov 2002 22:07:49 GMT
Date: 2002-11-05T22:07:49+00:00 [thread overview]
Message-ID: <ViXx9.26673$Lu1.40056@sccrnsc01> (raw)
In-Reply-To: eVWx9.26421$Lu1.39570@sccrnsc01
Caffeine Junky wrote:
> Recently I've actually taken the time to peruse the Ada.Strings section
> of the Ada LRM. Lot's of nifty functions there, although I'm somewhat
> fuzzy on what exactly they do. Probably because I havent bothered to play
> with Strings at all until recently. Example..
>
> Ada.Strings.Fixed
>
> function Index (Source : in String; Pattern : in String;
> Going : in Direction := Forward;
> Mapping : in Maps.Character_Mapping := Maps.Identity)
> return Natural;
>
>
> Now, the gist of this function is pretty clear. It looks at a String and
> returns the number of how many Characters are in the string(I'm
> assuming.) But what's this "Pattern" string I'm supposed to pass to it?
> Does it only count the characters in the String that match the Pattern given
> in the Pattern variable?
No, it searchs the string Source for the leftmost occurence of a
substring that is equal to Pattern and returns the index of the
start of that substring.
--
Mark Biggar
mark.a.biggar@attbi.com
next prev parent reply other threads:[~2002-11-05 22:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 21:40 Ada Strings Libraries for the clueless Caffeine Junky
2002-11-05 22:07 ` Mark Biggar [this message]
2002-11-05 22:17 ` Simon Wright
2002-11-06 0:41 ` Jeffrey Creem
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox