Software /
code /
prosody
File
teal-src/util/table.d.tl @ 12032:3db09eb4c43b
util.format: Ensure sanitation of strings passed to wrong format
Ie. log("debug", "%d", "\1\2\3") should not result in garbage.
Also optimizing for the common case of ASCII string passed to %s and
early returns everywhere.
Returning nil from a gsub callback keeps the original substring.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 11 Dec 2021 13:30:34 +0100 |
parent | 11459:86904555bffc |
child | 12618:17cc122cc2e8 |
line wrap: on
line source
local record lib create : function (narr:integer, nrec:integer):table pack : function (...:any):{any} end return lib