Noob question: How to do number formatting?

Discussion in 'Ruby' started by Ben Johnson, Aug 21, 2006.

  1. Ben Johnson

    Ben Johnson Guest

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

    thanks for your help.
     
    Ben Johnson, Aug 21, 2006
    #1
    1. Advertisements

  2. Use ri to look up printf, sprintf, and String#%
     
    Timothy Hunter, Aug 21, 2006
    #2
    1. Advertisements

  3. Do you know how C formatting works? The Ruby printf methods work the
    same way. The details are given with:
    ri Kernel#sprintf
     
    Chris Gehlker, Aug 21, 2006
    #3
  4. --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):
    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--
     
    Thorsten Haude, Aug 21, 2006
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.