From: Pascal Obry <p.obry@wanadoo.fr>
Subject: Re: Natural to String without space? (newbie question)
Date: 24 May 2001 08:33:00 +0200
Date: 2001-05-24T06:33:00+00:00 [thread overview]
Message-ID: <u4rub8der.fsf@wanadoo.fr> (raw)
In-Reply-To: 3B0BD493.5ABBA12B@labe.felk.cvut.cz
Tomas Hlavaty <hlavaty@labe.felk.cvut.cz> 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"
next prev parent reply other threads:[~2001-05-24 6:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-23 15:17 Natural to String without space? (newbie question) Tomas Hlavaty
2001-05-23 22:37 ` DuckE
2001-05-24 6:33 ` Pascal Obry [this message]
2001-05-29 21:04 ` Wes Groleau
2001-05-29 23:00 ` Jeffrey Carter
2001-05-30 7:19 ` Pascal Obry
-- strict thread matches above, loose matches on Subject: below --
2001-05-23 22:45 Beard, Frank
2001-05-24 7:56 ` Martin Dowie
2001-05-24 21:55 Beard, Frank
2001-05-25 7:30 ` Martin Dowie
2001-05-25 8:30 ` Tomas Hlavaty
2001-05-25 15:05 ` Ehud Lamm
2001-05-28 7:31 ` Martin Dowie
2001-05-25 21:23 ` Ole-Hjalmar Kristensen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox