🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16784

Re: DecimalFormat pattern

#16784
From: Vasudevan Srinivasan
Date: Tue, 19 Jan 1999 00:00
20 lines
1373 bytes
I found what setZeroDigit does. it sets the given character as the
representation for zero.
for eg if you say, setZeroDigit('1') and try to print 1234 you get 2345! It
is usually used when combined with international number set.
but the padding with spaces instead of 0's is still a problem.

Vasudevan Srinivasan wrote:

> Hi
> How do I pad a decimalformatted number with spaces?  for eg, if the
> number is 1234 i need to print as <b><b><b>1234
> where <b> is blank space. If I use the # char to format, I get 0s
> instead of <b> like 0001234. I tried
> DecimalFormat.getDecimalFormatSymbols().setZeroDigit(' ')  but it doesnt
> work. What does this function do? The help says nothing or nothing
> useful on this. I couldnt find anything on java tutorials on suns site
> too. Any suggestions?
>
> Thanks,
> Vasu
Technical Details
Message-ID: <36A4F516.23385CFA@netrisk.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36A4ECC3.6B7976D8@netrisk.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,7289183d386de349
X-Google-Attributes: gidf74b3,public
From: Vasudevan Srinivasan <vasudevan@netrisk.com>
Subject: Re: DecimalFormat pattern
Date: 1999/01/19
Message-ID: <36A4F516.23385CFA@netrisk.com>
X-Deja-AN: 434547525
Content-Transfer-Encoding: 7bit
References: <36A4ECC3.6B7976D8@netrisk.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language