How to create a line brake \n using the new string objects ?
Hello,
I have generative text, I need to send messages like : text "Hello \n I am a \n woman" to the jit.gl.text object. This is a string with break lines. I cannot write this mesage in a message box,
Every word in this phrase is an element of an array, so they can change.
How can I create breaklines \n within a long string using the new string objects ?
Thank you .
I have no experience with the new string objects, but a little with [jit.gl.text], and what I can say is that the easiest way to work with line breaks so far for me has been to format the text as a matrix, just like what [jit.textfile] does. Each row is a line, and each cell is the integer ASCII value of a character. That means that your matrix should have the same width as your longuest line (in terms of number of characters).
Otherwise it requires to convert everything in ASCII and add a 10
for each line break, like so:
I hope there is a better way using strings, though!
Something similar but - maybe - a little bit simpler:
limited to 2 items only ?
