From 391bf4ac34c86e773bb98d96f6836be272c31f8b Mon Sep 17 00:00:00 2001 From: JamesonHuang <462430725@qq.com> Date: Sat, 27 Jun 2015 17:34:54 +0800 Subject: [PATCH] lua string sub from last --- 1_6.lua_test/1_2.test_str_sub_from_last.lua | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 1_6.lua_test/1_2.test_str_sub_from_last.lua diff --git a/1_6.lua_test/1_2.test_str_sub_from_last.lua b/1_6.lua_test/1_2.test_str_sub_from_last.lua new file mode 100644 index 0000000..9fcf674 --- /dev/null +++ b/1_6.lua_test/1_2.test_str_sub_from_last.lua @@ -0,0 +1,2 @@ +local str = "hello world!" +print(string.sub(str, -3, -1))