Formats and escapes a string for use as a URI.
This function takes a `va_list`.
Similar to the standard C vsprintf function but safer, since it calculates the maximum space required and allocates memory
to hold the result.
| format |
a standard printf format string, but notice <link linkend="string-precision">string precision pitfalls</link> documented in to_string |
| args |
the list of parameters to insert into the format string |
|
a newly-allocated string holding the result. |