Originally Posted by MunkDev
Code:
text = text:gsub("[\1\10\32\34\92#%%%'%(%)%*%+,%-%./%d:;<>=%[%]^{|}~]", space)
|
You might want to remove
\32 because it ends up replacing spaces with itself.
The way Lua handles strings, there's no need to store it in a constant. It's actually using up more resources to do so.
Originally Posted by MunkDev
Code:
local space = strchar(32)
|
You should never use this function with a static number.
Just use a literal string in the
gsub() call as noted previously.