(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://www.codercto.com/soft/d/23477.html

Algorithms for Image Processing and Computer Vision

Algorithms for Image Processing and Computer Vision

Parker, J. R. / 2010-12 / 687.00元

A cookbook of algorithms for common image processing applications Thanks to advances in computer hardware and software, algorithms have been developed that support sophisticated image processing with......一起来看看 《Algorithms for Image Processing and Computer Vision》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器