Skip to main content

str_reverse

Function str_reverse 

Source
pub fn str_reverse(state: &mut LuaState) -> Result<usize, LuaError>
Expand description

string.reverse(s) — return string with bytes reversed.

C: static int str_reverse(lua_State *L)

Borrow the source bytes; the previous check_arg_string made a full owned copy that was discarded after the single iteration.