I'm looking for an alternative way to express new line(\n) in Lua since my host application doesn't allow users to use \ character.
Here's my code:
local str = "Hello\nWorld"
print(str)
Is there any alternative solution to make the same string without using \n character?
You can enter newlines directly into the string using long strings:
local str = [[Hello
World]]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With