# perl $formatted = sprintf("%.2f", $unformatted); # javascript, assuming it doesn't have a s?printf() function formatted = Math.round(unformatted * 100) / 100;
In reply to Re: Using Regular Expressions to Simulate sprintf() function - One Liner Challenge
by Fastolfe
in thread Using Regular Expressions to Simulate sprintf() function - One Liner Challenge
by Incognito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |