comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcNOSPAM@mckae.com>
Subject: Re: span string.
Date: Fri, 22 Apr 2005 13:44:55 -0500
Date: 2005-04-22T13:44:55-05:00	[thread overview]
Message-ID: <ce2e7$42694624$4995675$27676@ALLTEL.NET> (raw)
In-Reply-To: <d4bb48$1ocp$1@node2.news.atman.pl>

Doker wrote:
> I have string like that "abc1020"
> haw can i make it a string of fixed lenght of 10 chars like "   abc1020"?
> "abc" => "       abc" "4" => "         4"
> "1234567uui" => "1234567uui"

See the procedure "Move" in package Ada.Strings.Fixed.

     Move("abc1020", String_10, Justify => Right);
     Move("abc", String_10, Justify => Right);
     Move("4", String_10, Justify => Right);
     Move("1234567uui", String_10, Justify => Right);

(Move also has other parameters for what pad character to use, and what 
to do if the source string is longer than the target.)

Marc A. Criley
www.mckae.com



  reply	other threads:[~2005-04-22 18:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-22 17:18 span string Doker
2005-04-22 18:44 ` Marc A. Criley [this message]
2005-04-22 20:31   ` Doker
2005-04-22 23:45     ` Marius Amado Alves
2005-04-23  6:39     ` Martin Krischik
2005-04-23 15:43       ` Steve
2005-04-23 19:59         ` Martin Krischik
2005-04-24 13:01         ` Stephen Leake
2005-04-25 14:02     ` Peter Hermann
2005-04-23  4:10 ` Jeffrey Carter
2005-04-23 14:14 ` Doker
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox