(v)sprintf

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-16 06:13:56

软件介绍

Implements both a somewhat stripped down "classic" version of the C sprintf (no support for width, sign, padding and flags), and a python-like one employing named parameters.

Why another implementation, when we already have one? well:

  • size: 2262 bytes;
  • features: I wanted named arguments, like in python;
  • license: the existing implementation uses a BSD license, I wanted GPL;
  • and fun, of course.

Usage

//sprintf
//positional arguments
var classic = $.sprintf('%s %d%% %.3f', 'string', 40, 3.141593);
// classic = 'string 40% 3.142'

//named arguments
var named = $.sprintf('%(name)s: %(value)d', {name: 'age', value: 40});
// named = 'age: 40'

//vsprintf
var classic = $.vsprintf('%s %d%% %.3f', ['string', 40, 3.141593]);
// classic = 'string 40% 3.142'

//named arguments
var named = $.vsprintf('%(name)s: %(value)d', [{name: 'age', value: 40}]);
// named = 'age: 40'

本文地址:https://codercto.com/soft/d/23477.html

五子连珠必胜法

五子连珠必胜法

新井华石 / 张书 / 人民体育出版社 / 1997-10 / 12.00元

《五子连珠必胜法》经日本国虹有社授权,译自日本连珠社已故理事长新井华石九段经典著作《连珠必胜法》一书。内容阐述和介绍五子连珠的基本着法和各种常用的布局定式。全书分两大编。连珠基本编介绍连珠棋的发展历史、连珠棋的规则和规定以及基本珠形。连珠必胜编分为六章分别阐述和介绍各种常用布局定式,包括二号连浦月、五号连花月、一号连云月、二号桂名月、三号桂岚月、二号间恒星六种布局定式。一起来看看 《五子连珠必胜法》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具