function vsprintf(fmt/*:string*/, args/*:Array*/) { return doit(tokenize(fmt), args); } //function sprintf() { return doit(tokenize(arguments[0]), Array.prototype.slice.call(arguments, 1)); } function sprintf()/*:string*/ { var args/*:Array*/ = new Array(arguments.length - 1); for(var i = 0; i < args.length; ++i) args[i] = arguments[i+1]; return doit(tokenize(arguments[0]), args); }