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,e38b3d31f83372db X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-24 00:54:43 PST From: "Martin Dowie" Newsgroups: comp.lang.ada References: Subject: Re: Natural to String without space? (newbie question) Date: Thu, 24 May 2001 08:56:27 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: sg2c11210.dsge.edinbr.gmav.gecm.com Message-ID: <3b0cbc16$1@pull.gecm.com> X-Trace: 24 May 2001 08:45:26 GMT, sg2c11210.dsge.edinbr.gmav.gecm.com Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newspeer.clara.net!news.clara.net!dispose.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!sg2c11210.dsge.edinbr.gmav.gecm.com Xref: archiver1.google.com comp.lang.ada:7719 Date: 2001-05-24T08:56:27+01:00 List-Id: or, function Trim (Value : String; Side : Ada.Strings.Trim_End := Ada.Strings.Both) return String renames Ada.Strings.Fixed.Trim; Beard, Frank wrote in message news:mailman.990658037.12046.comp.lang.ada@ada.eu.org... > Probably the best way is: > > Make your own common function, such as: > > with Ada.Strings; use Ada.Srings; > with Ada.Strings.Fixed; use Ada.Srings.Fixed; > > function Trim(the_String : string) return string is > begin > return Trim(source => the_String, > side => both); > end Trim; > > > Then include it in a context clause, such as: > > with Ada.Text_Io; > with Trim; > > procedure Trim_Test is > > number : natural := 1234; > > begin > > Ada.Text_Io.Put_Line(Trim(natural'image(number))); > > end Trim_Test; > > > Hope this helps. > Frank > > -----Original Message----- > From: Tomas Hlavaty [mailto:hlavaty@labe.felk.cvut.cz] > Sent: Wednesday, May 23, 2001 11:18 AM > To: comp.lang.ada@ada.eu.org > Subject: Natural to String without space? (newbie question) > > > Natural'Image returns string with space at the begining. Is there any > standard way how to get number without this additional character? > > Thanks, > > Tomas > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada