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
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | Name of the file that shall be read |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | numberOfLines | Number of lines in file |