# how to delete the nth line in a multiline string?

How do I delete the $$n$$th line in a multi-line string.

For example how would I delete the $$2$$nd line in the following string?

``multiLineString = "line 1\nline 2\nline 3\nline 4"; ``

such that the output is

``"line 1\nline 3\nline 4" ``