<-- Previous || Up || Next -->

Count Lines Function
String Searches Class

Public Function CountLines( _
    ByVal vValue As Variant _
    ) As Variant

Count the number of lines within a string.
Works for Windows, DOS, and UNIX strings since it considers the line feed character to be the line terminator.

Examples:
    CountLines("One." + vbCrLf + "Two") = 2
    CountLines("One." + vbCrLf + "Two" + vbCrLf) = 2
See also:
    CountWords Function
    CountStrings Function
vValue: The string containing the lines of text to be counted. Function returns Null if vLine is Null or cannot be fixed up to a String. Uses the CountStrings function to determine the number of line terminators within the string.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.