简体   繁体   中英

How to separate text in lines in a table in Lua

local table_1 = {["choice"] = 'New Character(free)'};

this is the table, (free) need to be written in a different line

If you want to just format your source code you can simply write

local table_1 = {["choice"] = 'New Character
  (free)'};

If you need a linebreak in your string you can insert a newline character "\n"

local table_1 = {["choice"] = 'New Character\n(free)'};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM