Skip to content

Commit 6a75ad1

Browse files
committed
Rename toBytesFmt to toStringEx
I can't think of a better name at the moment, but at least this is an improvement
1 parent b93287d commit 6a75ad1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2876,8 +2876,9 @@ pub const Lua = struct {
28762876
}
28772877

28782878
/// Converts any Lua value at the given index into a string in a reasonable format
2879+
/// Uses the __tostring metamethod if available
28792880
/// See https://www.lua.org/manual/5.4/manual.html#luaL_tolstring
2880-
pub fn toBytesFmt(lua: *Lua, index: i32) [:0]const u8 {
2881+
pub fn toStringEx(lua: *Lua, index: i32) [:0]const u8 {
28812882
var length: usize = undefined;
28822883
const ptr = c.luaL_tolstring(lua.state, index, &length);
28832884
return ptr[0..length :0];

0 commit comments

Comments
 (0)