BindVar

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

软件介绍

Esta função é similar a sprintf, porém mais simples.

/*
* s = "The %1 want %2";
* a,b... = args
* BindVar(s,a,b) -> The a want b
* ex.: BindVar("text message %3 %1 and %2", value1, value2, value3) -> text message value3 value1 and value2
* last-modified: 20080429
*/
function BindVar()
{
var v='';
var args = BindVar.arguments;
var numArgs = args.length;
if(numArgs)
{
msg = args[0];
for(var i=1; i < numArgs; i++)
{
v = args[i] != undefined ? args[i] : "";
msg = msg.replace("%"+i, v);
}
}
return msg;
}

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

Computers and Intractability

Computers and Intractability

M R Garey、D S Johnson / W. H. Freeman / 1979-4-26 / GBP 53.99

This book's introduction features a humorous story of a man with a line of people behind him, who explains to his boss, "I can't find an efficient algorithm, but neither can all these famous people." ......一起来看看 《Computers and Intractability》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

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

RGB CMYK 互转工具