From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Ok - WHAT are those "Maps.Identity" things ???
Date: Wed, 5 Jan 2022 14:01:00 +0100 [thread overview]
Message-ID: <sr44qc$i68$1@dont-email.me> (raw)
In-Reply-To: <DpqdnRjI8_ercUn8nZ2dnUU7-UnNnZ2d@earthlink.com>
On 2022-01-05 01:54, 1.AAC0831 wrote:
>
> The docs say to use Index(source,substr,<something>,<something-identity>)
I don't know what "docs" you mean. Anyone using Ada should be familiar with its
standard library, which is documented in Annex A of the ARM at
http://www.ada-auth.org/standards/aarm12_w_tc1/html/AA-A.html
(I provide the link to the AARM as the annotations are sometimes useful.)
The documentation for Ada.Strings.Fixed is at
http://www.ada-auth.org/standards/aarm12_w_tc1/html/AA-A-4-3.html
and lists 6 functions named Index (and 2 for Index_Non_Blank). Of these I mostly
use the one at paragraph 9:
9 function Index (Source : in String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping
:= Maps.Identity)
return Natural;
with the defaults for the last 2 parameters. Occasionally I've used a Going =>
Backward,
The Mapping/Test parameters are for specialized needs, such as case-insensitive
matching or folding accented characters together, and the default will work if
you don't need anything like that.
--
Jeff Carter
"When and now is this guitar piece from Stottlemeyer?
Yes, it's with Mr. Dog in Gertrude's pinball forest."
The World's Funniest Joke
133
next prev parent reply other threads:[~2022-01-05 13:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 0:54 Ok - WHAT are those "Maps.Identity" things ??? 1.AAC0831
2022-01-05 5:49 ` Rod Kay
2022-01-07 2:31 ` 1.AAC0832
2022-01-07 3:39 ` Gautier write-only address
2022-01-07 4:14 ` Randy Brukardt
2022-01-10 5:13 ` 1.AAC0832
2022-01-10 10:19 ` Marius Amado-Alves
2022-01-11 5:20 ` 1.AAC0832
2022-01-07 11:48 ` G.B.
2022-01-10 4:49 ` 1.AAC0832
2022-01-05 13:01 ` Jeffrey R.Carter [this message]
2022-01-07 2:41 ` 1.AAC0832
2022-01-07 9:49 ` Jeffrey R.Carter
2022-01-10 4:46 ` 1.AAC0832
2022-01-10 15:05 ` Simon Wright
2022-01-11 5:17 ` 1.AAC0832
2022-01-11 11:33 ` Niklas Holsti
2022-01-12 4:22 ` 1.AAC0832
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox