in reply to Using Regular Expressions to Simulate sprintf() function - One Liner Challenge
# perl $formatted = sprintf("%.2f", $unformatted); # javascript, assuming it doesn't have a s?printf() function formatted = Math.round(unformatted * 100) / 100;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using Regular Expressions to Simulate sprintf() function - One Liner Challenge
by Incognito (Pilgrim) on Nov 06, 2001 at 06:59 UTC | |
by Fastolfe (Vicar) on Nov 06, 2001 at 07:16 UTC |