Implement printf, dprintf, string.format

This commit is contained in:
2026-02-17 19:57:58 -05:00
parent a987754b38
commit ff81d79b4a
7 changed files with 363 additions and 121 deletions

View File

@@ -0,0 +1,12 @@
# Lua String Formatting
Lua contains a builtin routine, string.format, which is similar to "printf."
We have reimplemented this from scratch, adding a bunch of new formatting
directives.
We have also added formatting routines that output to the
console and the debug logs. The new routines are:
format(format_string, arg1, arg2, arg3...)
dformat(format_string, arg1, arg2, arg3...)