.Modelica.Utilities.Streams.countLines

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.

Interface

impure function countLines
  extends Modelica.Icons.Function;
  input String fileName "Name of the file that shall be read" annotation(
    Dialog(loadSelector(filter = "Text files (*.txt)", caption = "Open text file for counting lines")));
  output Integer numberOfLines "Number of lines in file";
end countLines;

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f