lineCount function

int lineCount(
  1. String str
)

Determines the number of lines in str.

Implementation

int lineCount(String str) =>
    charFrequency(str, '\n', filterNonChars: false) + 1;