Link Details

Link 902079 thumbnail
User 330795 avatar

By cwrighta70
via chrismwright.wordpress.com
Published: Jan 08 2013 / 08:21

Recently, I had to write an app that displayed a number of strings each containing a label and a monetary/numerical value (i.e. "Balance: $10,000.00"). One requirement was to make all of the decimal points line up vertically. After searching the net for an easy solution and coming up empty, I decided to write my own function to format the strings properly. This is my solution. And please, if you know an easier solution, let me know! I love learning new methods!
  • 3
  • 1
  • 562
  • 429

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (3)



Voters Against This Link (1)



Java Performance Optimization
Written by: Pierre-Hugues Charbonneau
Featured Refcardz: Top Refcardz:
  1. Design Patterns
  2. OO JS
  3. Cont. Delivery
  4. Java EE7
  5. HTML5 Mobile
  1. Node.js
  2. Debugging JavaScript
  3. OO JS
  4. JSON
  5. Ajax