joinNonEmptyLines Summary Condenses multiple non-empty lines of text into a single line of text. Signatures Click on a signature to select it and view its documentation. public string joinNonEmptyLines() public string joinNonEmptyLines(string separator) Usage public string joinNonEmptyLines() public string joinNonEmptyLines(string separator) Returns A string representing all the non-empty lines joined together. A string representing all the non-empty lines joined together. Parameters separator The separator to use for the joined lines of text. Description The lines will be joined by a single space (" "). The lines will be joined by the specified separator. Examples Basic Usage 12345678910import System; string text = """ The quick brown fox jumped over the lazy dog. """; Console.log(text.joinNonEmptyLines()); // "The quick brown fox jumped over the lazy dog." Basic Usage 123456789101112import System; string text = """ foo bar baz """; Console.log(text.joinNonEmptyLines(" -> ")); // "foo -> bar -> baz" Share HTML | BBCode | Direct Link