Afficher un message
Vieux 20/06/2008, 21h11   #3
shawn bright
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how to force a decimal

[Note: parts of this message were removed to make it a legal post.]

cool, thanks much !

On Fri, Jun 20, 2008 at 1:38 PM, ThoML <micathom@gmail.com> wrote:

> > say i wanted to do 3.5.to_s
> > but i need that to be 3.50 as the string,

>
> Use String#% and friends:
>
> "%.2f" % 3.5
>
>


  Réponse avec citation
 
Page generated in 0,04185 seconds with 9 queries