.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

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-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39