* Manipulating strings
@ 1996-03-31 0:00 Hung Huynh
1996-04-01 0:00 ` Laurent Guerby
0 siblings, 1 reply; 2+ messages in thread
From: Hung Huynh @ 1996-03-31 0:00 UTC (permalink / raw)
Hi!
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?
My string is output from another procedure.
I don't want to do it with the help of a function that is recursivly
defined, neither should it be with any kind of loop.
Thanks!
/Hung
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Manipulating strings
1996-03-31 0:00 Manipulating strings Hung Huynh
@ 1996-04-01 0:00 ` Laurent Guerby
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Guerby @ 1996-04-01 0:00 UTC (permalink / raw)
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-04-01 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-03-31 0:00 Manipulating strings Hung Huynh
1996-04-01 0:00 ` Laurent Guerby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox