Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 47775 invoked from network); 18 Nov 2005 21:20:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Nov 2005 21:20:06 -0000 Received: (qmail 1771 invoked by uid 500); 18 Nov 2005 21:20:00 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 1732 invoked by uid 500); 18 Nov 2005 21:20:00 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 1720 invoked by uid 99); 18 Nov 2005 21:19:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2005 13:19:59 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of elifarley@gmail.com designates 66.249.82.197 as permitted sender) Received: from [66.249.82.197] (HELO xproxy.gmail.com) (66.249.82.197) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2005 13:21:33 -0800 Received: by xproxy.gmail.com with SMTP id t12so300972wxc for ; Fri, 18 Nov 2005 13:19:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SMBBu0jTQUG3jSIKNS0j57E2+EtiNlhjcNicIh51jdRf2IIVenXn1rleg365bg76nLKHAHwhIhrmFoJoJ64Bp0TBY7Ad7rsO+PajdzQwNT7Ciwh2m/SmN7qC8lGu9wQ4/YOcjcvJLzbMZhMjdm9vCF5yQX590+uztQl65UZ6J/k= Received: by 10.70.43.20 with SMTP id q20mr150834wxq; Fri, 18 Nov 2005 13:19:38 -0800 (PST) Received: by 10.70.8.8 with HTTP; Fri, 18 Nov 2005 13:19:38 -0800 (PST) Message-ID: <6a219efc0511181319s2ad45550w6b9d514e4af9b1ae@mail.gmail.com> Date: Fri, 18 Nov 2005 19:19:38 -0200 From: Elifarley Callado Coelho Cruz To: Jakarta Commons Users List Subject: Re: commons-lang StringUtils.rightPad - truncate In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I have develop a StringKit class which has a rightPad method that handles truncation as well. I can send it to you (it's LGPL). Regards, Elifarley On 11/18/05, Mark Lybarger wrote: > docs for StringUtils.rightPad("FOO",1) shows that it returns "FOO". > Is there a method to get the rightPadding to also handle truncation? > I'm looking to format fixed length fields where the output has to be X > and only X characters. thus i have to truncate anythe extra stuff > that might be there. > > thanks! > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org