comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <p.obry@wanadoo.fr>
Subject: Re: Simple library functions
Date: 13 Feb 2004 22:55:30 +0100
Date: 2004-02-13T21:55:31+00:00	[thread overview]
Message-ID: <ufzdek5kd.fsf@wanadoo.fr> (raw)
In-Reply-To: 19401efb.0402122318.68154453@posting.google.com


scallassig@mailexpire.com (Harald Korneliussen) writes:

> String strings[] = s.split();
> 
> // strings[] is now {"hi", "he", "ha", "ho"}
> 
> In java it takes a regexp, with " \t\n" as default. My function takes
> a set of characters (from Ada.Characters.Maps), with the set of
> whitespace as default.

You can do that easily with my String_Cutter package. See my homepage in the
Ada -> Download section.

GNAT has now an equivalent package named GNAT.String_Split.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



  parent reply	other threads:[~2004-02-13 21:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-12 19:37 Simple library functions Harald Korneliussen
2004-02-12 19:50 ` Ed Falis
2004-02-12 19:54 ` Ed Falis
2004-02-12 20:54 ` Ludovic Brenta
2004-02-13  0:52 ` Jeffrey Carter
2004-02-13  7:18   ` Harald Korneliussen
2004-02-13 12:54     ` Harald Korneliussen
2004-02-13 21:36       ` Randy Brukardt
2004-02-13 21:55     ` Pascal Obry [this message]
2004-02-14 16:14       ` Harald Korneliussen
2004-02-13  1:21 ` Stephen Leake
replies disabled

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