.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 2024-11-21T19:25:40Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos