Say I have
local word = “Hi friend”
How do I turn it into
Hi%20friend
Say I have
local word = “Hi friend”
How do I turn it into
Hi%20friend
word:gsub("%s", "%%20")
This replaces each space with %20
, the extra %
there is to escape the first, since %
has a special meaning in string patterns.
Is there a guide on lua(u) formatting for strings, or is it similar to something like C or golang?