Annotate

teal-src/util/strbitop.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 11432:113f3912c7cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record mod
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 sand : function (string, string) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 sor : function (string, string) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 sxor : function (string, string) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 end
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 return mod