BindVar
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/BindVar
软件介绍
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;
}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》 这本书的介绍吧!
