Noob question: How to do number formatting?

B

Ben Johnson

I searched the documentation and everything and can't find a simple
method for number formatting. Any links?

thanks for your help.
 
T

Timothy Hunter

Ben said:
I searched the documentation and everything and can't find a simple
method for number formatting. Any links?

thanks for your help.
Use ri to look up printf, sprintf, and String#%
 
C

Chris Gehlker

I searched the documentation and everything and can't find a simple
method for number formatting. Any links?

Do you know how C formatting works? The Ruby printf methods work the
same way. The details are given with:
ri Kernel#sprintf
 
T

Thorsten Haude

--aVD9QWMuhilNxW9f
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

* Ben Johnson wrote (2006-08-22 06:27):
I searched the documentation and everything and can't find a simple=20
method for number formatting. Any links?

Something like this?

http://www.rubycentral.com/ref/ref_m_kernel.html#sprintf


Thorsten Broken Social Scene: It's all gonna break
--=20
Endorsing products is the American way of expressing individuality.
- Calvin

--aVD9QWMuhilNxW9f
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFE6idRW/x2JEBlodoRAhYwAJ9p3hG4Trybhu6nE1yGFX8GK8SrUgCg6fPl
ND3KcPr9vg+EPnbqEAYEApQ=
=K7uj
-----END PGP SIGNATURE-----

--aVD9QWMuhilNxW9f--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top