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
相關文章
相關標籤/搜索