[PATCH] sprintf like functions and "*" modifier
| From: | Azat Khuzhin | Date: | Fri, 13 Jan 2012 13:10:47 +0000 |
| Subject: | [PATCH] sprintf like functions and "*" modifier | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-57349@lists.php.net to get a copy of this message | ||
Hi all, I'v add support of "*" modifier for sprintf, it exist in sprintf C
implementation (http://www.cplusplus.com/reference/clibrary/cstdio/printf/)
Usage:
sprintf("%.*f", 2, 2) // output "2.00"
sprintf("%.2f", 2) // output "2.00"
My patch attached
--
Azat Khuzhin
Attachment: [text/x-patch] formatted_print.patch
Attachment: [text/x-patch] formatted_print.patch