impure functioncountLines

Return the number of lines in a file

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

numberOfLines = Streams.countLines(fileName)

Description

Function countLines(..) opens the given file, reads the complete content, closes the file and returns the number of lines. Lines are separated by LF or CR-LF.

Inputs

TypeNameDefaultDescription
StringfileNameName of the file that shall be read

Outputs

TypeNameDefaultDescription
IntegernumberOfLinesNumber of lines in file