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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to get this space away? Date: Tue, 02 Jun 2015 21:53:28 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="8f3bdf433f184ad9fec01bd73e350c65"; logging-data="1749"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vNt2031tTwXfQGi5QSX8623s8S/l2cbI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:LgnYKhHQSjW4fWjbc+E6NHa65YE= sha1:EDQytdKVHWbzqnnFOJW5WeXmUzg= Xref: news.eternal-september.org comp.lang.ada:26139 Date: 2015-06-02T21:53:28+01:00 List-Id: Laurent writes: > The only problem is that if the values I use are of the type integer I > get a leading space I don't want/need. I have no idea where it comes > from or how to get rid of it in this case. You've used Foo'Img, which here is the same as Integer'Image (Foo), and which always, unavoidably, provides a leading space for positive numbers. You've provided something like function "+" (R : String) return Bounded_String renames To_Bounded_String; and instead you need to provide something like function "+" (R : String) return Bounded_String is begin return To_Bounded_String (Ada.Strings.Fixed.Trim (R, Ada.Strings.Both)); end "+";