标签:
命名跟修改一个string:
a = "one string" b = string.gsub(a, "one", "another") -- change string parts print(a) --> one string print(b) --> another string
转义字符:
\a bell
\b back space
\f form feed
\n newline
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\" double quote
\‘ single quote
\[ left square bracket
\] right square bracket
不想累死的话, 用[[]]包含大量的转义字符:
page = [[ <HTML> <HEAD> <TITLE>An HTML Page</TITLE> </HEAD> <BODY> <A HREF="http://www.lua.org">Lua</A> [[a text between double brackets]] </BODY> </HTML> ]]
标签:
原文地址:http://www.cnblogs.com/Montauk/p/5457510.html