From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a13657a6f67ac494 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-12 23:18:26 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: scallassig@mailexpire.com (Harald Korneliussen) Newsgroups: comp.lang.ada Subject: Re: Simple library functions Date: 12 Feb 2004 23:18:26 -0800 Organization: http://groups.google.com Message-ID: <19401efb.0402122318.68154453@posting.google.com> References: <19401efb.0402121137.2a20b681@posting.google.com> NNTP-Posting-Host: 158.38.142.123 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1076656706 11709 127.0.0.1 (13 Feb 2004 07:18:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 13 Feb 2004 07:18:26 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:5520 Date: 2004-02-12T23:18:26-08:00 List-Id: Jeffrey Carter wrote in message news: > 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....