From 3295caca3d21b20ccab19ab3420d07a139b4f200 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Nov 2014 23:18:50 +0100 Subject: lua: add a function that formats Lua values as strings Yep, Lua is so crappy that the stdlib doesn't provide anything like this. Repurposes the undocumented mp.format_table() function and moves it to mp.utils. --- DOCS/man/lua.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 3c0d104e40..57c1c35e5d 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -623,6 +623,10 @@ strictly part of the guaranteed API. trailing text is returned as 3rd return value. (The 3rd return value is always there, but with ``trail`` set, no error is raised.) +``utils.to_string(v)`` + Turn the given value into a string. Formats tables and their contents. This + doesn't do anything special; it is only needed because Lua is terrible. + Events ------ -- cgit v1.2.3