Hi, I’m trying to make a modulescript for info on characters. So far it’s been working fine, but I found that when you print a string, it looks like this:
In code:
How would I define strings in a way that can have multiple lines (for readability) that wouldn’t affect the string itself? (Ex. printing out like this:)
what about using a custom character that behaves as your \n like this.
This would make every _ be a new line. you could swap it out to some symbol or a chinese character you will never use in your string so that it doesn’t interfere with the text.
local customLineSplitter = "_"
local str = [[
Multi_
Line_
Hello
World
]]
local singleLine = string.gsub(str, "\n", "")
local customNewLine = string.gsub(singleLine, customLineSplitter, "\n")
print(customNewLine)
--[[
Multi
Line
HelloWorld
]]