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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,60c38d91ea5aab36 X-Google-Attributes: gid103376,public From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) Subject: Re: Manipulating strings Date: 1996/04/01 Message-ID: <4xag0wpzyl.fsf@leibniz.enst-bretagne.fr>#1/1 X-Deja-AN: 145143155 distribution: world sender: guerby@leibniz.enst-bretagne.fr references: content-type: text/plain; charset=US-ASCII organization: Telecom Bretagne mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-04-01T00:00:00+00:00 List-Id: 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)