Method ExtString.LineCount(+ 1 overload)
Overload
Returns the number of lines.
public static int LineCount(this string t, bool preferMore = false, Range? range = null, bool rareNewlines = false)
Parameters
t (string)
This string. |
preferMore (bool)
Add 1 if the string ends with a line separator or its length is 0. |
range (Range?)
Part of this string or |
rareNewlines (bool)
If |
Returns
Exceptions
See Also
Overload(top)
Returns the number of lines.
public static int LineCount(this ReadOnlySpan<char> t, bool preferMore = false, bool rareNewlines = false)
Parameters
t (ReadOnlySpan<char>)
This string. |
preferMore (bool)
Add 1 if the string ends with a line separator or its length is 0. |
rareNewlines (bool)
If |