整理代码,继续减少单双引号混用
This commit is contained in:
@@ -4,12 +4,12 @@ local find,sub,upper=string.find,string.sub,string.upper
|
||||
|
||||
do--function STRING.shiftChar(c)
|
||||
local shiftMap={
|
||||
["1"]="!",["2"]="@",["3"]="#",["4"]="$",["5"]="%",
|
||||
["6"]="^",["7"]="&",["8"]="*",["9"]="(",["0"]=")",
|
||||
["`"]="~",["-"]="_",["="]="+",
|
||||
["["]="{",["]"]="}",["\\"]="|",
|
||||
[";"]=":",["'"]="\"",
|
||||
[","]="<",["."]=">",["/"]="?",
|
||||
['1']='!',['2']='@',['3']='#',['4']='$',['5']='%',
|
||||
['6']='^',['7']='&',['8']='*',['9']='(',['0']=')',
|
||||
['`']='~',['-']='_',['=']='+',
|
||||
['[']='{',[']']='}',['\\']='|',
|
||||
[';']=':',['\'']='"',
|
||||
[',']='<',['.']='>',['/']='?',
|
||||
}
|
||||
function STRING.shiftChar(c)
|
||||
return shiftMap[c]or upper(c)
|
||||
@@ -59,7 +59,7 @@ end
|
||||
|
||||
do--function STRING.urlEncode(str)
|
||||
local rshift=bit.rshift
|
||||
local b16={[0]="0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"}
|
||||
local b16={[0]='0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}
|
||||
function STRING.urlEncode(str)
|
||||
local out=""
|
||||
for i=1,#str do
|
||||
|
||||
Reference in New Issue
Block a user