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-Thread: 103376,8415ea38d87a014 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!atl-c03.usenetserver.com!pc02.usenetserver.com!ALLTEL.NET!not-for-mail Date: Fri, 22 Apr 2005 13:44:55 -0500 From: "Marc A. Criley" User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: span string. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: ce2e742694624a13cf3d027676 Xref: g2news1.google.com comp.lang.ada:10640 Date: 2005-04-22T13:44:55-05:00 List-Id: 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