It looks like you're new here. If you want to get involved, click one of these buttons!
How can I take a normal Line of text, and put a line break after specific characters?
How about:
s = "Line 1|Line 2" s = string.gsub(s, "|", "\n")
The best chance I see is to do it manually with string.sub():
line80 = string.sub(line, 1, 80) morelines = string,sub(line, 81) if morelines == "" then -- no line break needed else -- need a line break end
You may need to run it in a loop for very long strings, of course. The code above is just to get the idea.
After reading mpilgrem's code, I probably misunderstood the question.
Comments
How about:
The best chance I see is to do it manually with string.sub():
You may need to run it in a loop for very long strings, of course. The code above is just to get the idea.
After reading mpilgrem's code, I probably misunderstood the question.