JavaScript等同于printf / String.Format - JavaScript equivalent to printf/String.Format

问题:

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() ( IFormatProvider for .NET). 我正在寻找一个等效于C / PHP printf()或C#/ Java程序员的String.Format() (适用于.NET的IFormatProvider String.Format() JavaScript。 程序员

My basic requirement is a thousand separator format for numbers for now, but something that handles lots of combinations (including dates) would be good. 个人基本要求是如今使用数字的千位分隔符格式,可是能够处理不少组合(包括日期)的东西会很好。 框架

I realize Microsoft's Ajax library provides a version of String.Format() , but we don't want the entire overhead of that framework. 我意识到Microsoft的Ajax库提供了String.Format()的版本,可是咱们不但愿该框架的所有开销。 ide


解决方案:

参考一: https://stackoom.com/question/2YnG/JavaScript等同于printf-String-Format
参考二: https://oldbug.net/q/2YnG/JavaScript-equivalent-to-printf-String-Format
相关文章
相关标签/搜索