Replacing new lines in mlTextEdit with \n
by Nick Matthews · in Torque Game Engine · 08/03/2007 (4:46 pm) · 5 replies
I'm trying to get all the text in an MLTextEditCtrl onto one line. I'm sure there is a command or something to replace all the returns with a \n but I just can't remember it. Just to make sure you know what I mean, i want to turn:
Blah
Text
Here
Into Blah\nText\n\nHere. Thanks.
Blah
Text
Here
Into Blah\nText\n\nHere. Thanks.
#2
08/03/2007 (4:55 pm)
Well I meant for ingame, actually. Exporting the text to a file, closing the game, search and replacing the contents and then re-opening the game isn't very user friendly, if you know what I mean ;)
#3
08/05/2007 (1:40 pm)
Dude, it's ExpandEscape(%text);.
#4
08/05/2007 (1:40 pm)
And to undo it, it's CollapseEscape(%text);.
#5
i would edit the TDN article to include the following note, but every time i edit something in TDN the whole entry collapses so, note: it replaces all occurances of the needle, so it's pretty much exactly what you want.
08/05/2007 (1:54 pm)
Ah. you want strreplace()i would edit the TDN article to include the following note, but every time i edit something in TDN the whole entry collapses so, note: it replaces all occurances of the needle, so it's pretty much exactly what you want.
Associate Orion Elenzil
Real Life Plus
highlight the carriage return itself,
and do replace-all.