Notifications
Clear all

[Closed] How to add text in a inside a multiline string

lets say I have this variable:

def = “text 1”
def += “
text 2″
def += “
text 3″
def += “
text 4″
def += “
text 5″
def += “
text 6″
def += “
text 7″

How do a add a new line between line 3 and 4 with maxscript ?

1 Reply

you have to brake the string first (substring) and then concatenate three parts – the first one, a new one, and the second part of the original string. or in your particular case you can split your string by lines and then make a new string with a new line in it (filterString).