From 7a533c7be528fe34f7a65e992322dbcfb7eefce1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 7 May 2006 00:25:30 +0000 Subject: [PATCH] Added vformat() --- plugins/include/string.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/include/string.inc b/plugins/include/string.inc index 68fe82cd..b056e5c8 100755 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -47,6 +47,17 @@ native format(output[] ,len ,const format[] , {Float,Sql,Result,_}:...); */ native formatex(output[] ,len ,const format[] , {Float,Sql,Result,_}:...); +/* Replacement for format_args. Much faster and %L compatible. + * This works exactly like vsnprintf() from C. + * You must pass in the output buffer and its size, + * the string to format, and the number of the FIRST variable + * argument parameter. For example, for: + * function (a, b, c, ...) + * You would pass 4 (a is 1, b is 2, c is 3, et cetera). + * There is no vformatex(). + */ +native vformat(buffer[], len, const fmt[], vararg); + /* Gets parameters from function as formated string. */ native format_args(output[] ,len ,pos = 0);