countNonEmptyLines Summary Counts the number of non-empty lines in the string. Usage public int countNonEmptyLines() Returns The number of non-empty lines in the string. Description Counts the number of non-empty lines in the string. Only empty strings count as empty lines (""). Strings with whitespace do not count as empty lines. Please note that this method's return value will overflow and wrap if it exceeds System.Integer32.MAX_VALUE. Examples Basic Usage 12345678910111213import System; string story = """ The quick brown fox jumped over the lazy dog. """; Console.log(story.countLines()); // 5Console.log(story.countNonEmptyLines()); // 3 Share HTML | BBCode | Direct Link