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-23 23:33:01 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!opentransit.net!wanadoo.fr!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: Natural to String without space? (newbie question) Date: 24 May 2001 08:33:00 +0200 Organization: Home - http://perso.wanadoo.fr/pascal.obry Message-ID: References: <3B0BD493.5ABBA12B@labe.felk.cvut.cz> NNTP-Posting-Host: mix-velizy-106-3-216.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: wanadoo.fr 990685980 11584 193.249.122.216 (24 May 2001 06:33:00 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 24 May 2001 06:33:00 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.103 Xref: archiver1.google.com comp.lang.ada:7718 Date: 2001-05-24T06:33:00+00:00 List-Id: Tomas Hlavaty writes: > Natural'Image returns string with space at the begining. Is there any > standard way how to get number without this additional character? > Others have given solution using Trim. Another one is simply: function Image (N : in Natural) return String is N_Image : constant String := Natural'Image (N); begin return N_Image (2 .. N_Image'Last); end Image; Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination"