Colton Idle
09/17/2021, 11:25 AMText("first line\nsecond line")
but it just shows the \n directly in the Text widget
According to SO, I should do Text("first line\r\nsecond line")
but that didn't work either. Any thoughts?
Edit: nvm did this and it works now
myText.replace("""\n""", "\n")
Zach Klippenstein (he/him) [MOD]
09/17/2021, 4:22 PMColton Idle
09/17/2021, 4:23 PMColton Idle
09/20/2021, 3:14 AMZach Klippenstein (he/him) [MOD]
09/20/2021, 4:15 PM\n
characters are actually new lines?Colton Idle
09/20/2021, 4:25 PMColton Idle
09/20/2021, 4:27 PMZach Klippenstein (he/him) [MOD]
09/20/2021, 4:36 PM\
and a n
in the string.Colton Idle
09/20/2021, 4:44 PMColton Idle
09/21/2021, 4:11 AMTest\n\nOne. \n\nTwo\nThree
The byte array is
[84, 101, 115, 116, 92, 110, 92, 110, 79, 110, 101, 46, 32, 92, 110, 92, 110, 84, 119, 111, 92, 110, 84, 104, 114, 101, 101]
Zach Klippenstein (he/him) [MOD]
09/21/2021, 6:35 PM\
and n
. You should see a 10 instead of the (92,110) pair – 10 is the newline character. I’m not sure how they’re getting in there, you could check the data at various points in your data flow.Colton Idle
09/21/2021, 6:37 PMColton Idle
09/21/2021, 6:38 PMZach Klippenstein (he/him) [MOD]
09/21/2021, 6:39 PMZach Klippenstein (he/him) [MOD]
09/21/2021, 6:41 PMColton Idle
09/21/2021, 6:41 PMColton Idle
09/21/2021, 6:42 PMColton Idle
09/21/2021, 6:42 PMZach Klippenstein (he/him) [MOD]
09/21/2021, 6:52 PMColton Idle
09/21/2021, 7:01 PMColton Idle
09/21/2021, 7:01 PMColton Idle
09/22/2021, 1:00 AMZach Klippenstein (he/him) [MOD]
09/22/2021, 3:02 PM