diff options
Diffstat (limited to 'node_modules/locutus/php/strings/vprintf.js')
-rw-r--r-- | node_modules/locutus/php/strings/vprintf.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/node_modules/locutus/php/strings/vprintf.js b/node_modules/locutus/php/strings/vprintf.js new file mode 100644 index 0000000..52a0b9e --- /dev/null +++ b/node_modules/locutus/php/strings/vprintf.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = function vprintf(format, args) { + // discuss at: http://locutus.io/php/vprintf/ + // original by: Ash Searle (http://hexmen.com/blog/) + // improved by: Michael White (http://getsprink.com) + // reimplemented by: Brett Zamir (http://brett-zamir.me) + // example 1: vprintf("%01.2f", 123.1) + // returns 1: 6 + + var sprintf = require('../strings/sprintf'); + var echo = require('../strings/echo'); + var ret = sprintf.apply(this, [format].concat(args)); + echo(ret); + + return ret.length; +}; +//# sourceMappingURL=vprintf.js.map
\ No newline at end of file |