you can split the string, reverse it, and concatenate it again,
local content = ""
local reversedWords = {}
for _, word in ipairs(string.split(content, " ")) do
table.insert(reversedWords, string.reverse(word))
end
local result = table.concat(reversedWords, " ")
Oh I misunderstood the question, this code will reverse the order of the words.
local content = ""
local reversedWords = {}
for _, word in ipairs(string.split(content, " ")) do
table.insert(reversedWords, 1, word)
end
local result = table.concat(reversedWords, " ")