Return a formatted string
external links: original PHP docs | raw js source
Running
1 | sprintf("%01.2f", 123.1); |
Should return
1 | 123.10 |
Running
1 | sprintf("[%10s]", 'monkey'); |
Should return
1 | '[ monkey]' |
No dependencies, you can use this function standalone.
下载代码:
http://download.csdn.net/source/1972080
http://d.namipan.com/d/ef8fc4b6a0ec4e761878b197441564c876bec24284320000