comp.lang.ada
 help / color / mirror / Atom feed
From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby)
Subject: Re: Manipulating strings
Date: 1996/04/01
Date: 1996-04-01T00:00:00+00:00	[thread overview]
Message-ID: <4xag0wpzyl.fsf@leibniz.enst-bretagne.fr> (raw)
In-Reply-To: Pine.SOL.3.92.960331164649.12941B-100000@sunna.dtek.chalmers.se

Hung Huynh writes
: Let's say I've got this string: "this is my string     "
: 
: As you can see there's uneccessary spaces at the end of the string. I
: want to send just the string without the spaces into a procedure. How do I
: do this?

   If you're using Ada 95, just try to call :

   Trim (Source => Your_String, Side => Right)

   See  RM95-A.4.3(89-96)  for details,  and  BTW  carefully read  the
chapter A.4,  you'll get  everything  you want about   string handling
(except general regexeps, anyone working on a rx binding ?). Note that
the RM95 is available in hypertext from the URL :

   http://lglwww.epfl.ch/Ada/

   among plenty of interesting things.

   If you're not using Ada 95, just download the GNAT sources (or look
at the adainclude in the binary distributions), and grab the code from
a-strfix.adb (URL plus good advices in my signature ;-).

: Thanks!
: 
: /Hung

   Hope this helps,

-- 
--  Laurent Guerby, student at Telecom Bretagne (France), Team Ada
--  "Use the Source, Luke. The Source will be with you, always (GPL)"
--  http://www-eleves.enst-bretagne.fr/~guerby/ (GATO Project)
--  Try GNAT, the GNU Ada 95 compiler (ftp://cs.nyu.edu/pub/gnat)




      reply	other threads:[~1996-04-01  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-31  0:00 Manipulating strings Hung Huynh
1996-04-01  0:00 ` Laurent Guerby [this message]
replies disabled

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