comp.lang.ada
 help / color / mirror / Atom feed
From: scallassig@mailexpire.com (Harald Korneliussen)
Subject: Re: Simple library functions
Date: 12 Feb 2004 23:18:26 -0800
Date: 2004-02-12T23:18:26-08:00	[thread overview]
Message-ID: <19401efb.0402122318.68154453@posting.google.com> (raw)
In-Reply-To: kdVWb.1821$tL3.1324@newsread1.news.pas.earthlink.net

Jeffrey Carter <spam@spam.com> wrote in message news:<kdVWb.1821

> 
> There's no function for that in the standard library because it's part 
> of the language. Others have pointed out the 'Value attribute.

Oops, you're right of course. I found it right after I posted, in a
tutorial. I couln't find it in the RM however, but then again I looked
at strings and integers only, not attributes.
 
> I have no idea what String.split does in Java, but I suspect it's 
> similar to Ada.Strings.(Fixed | Bounded | Unbounded).Find_Token. If not, 
> you could look at www.adapower.com or www.adahome.com for Open_Token.

String.split works like this:

String s = "hi he ha ho"

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.

I'll be right back....



  reply	other threads:[~2004-02-13  7:18 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 [this message]
2004-02-13 12:54     ` Harald Korneliussen
2004-02-13 21:36       ` Randy Brukardt
2004-02-13 21:55     ` Pascal Obry
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