removeFirstElement function
Requirements.Internal.removeFirstElement
ยท source
Remove first part of one line of the log file (until \",\")
Extends Modelica.Icons.Function
Splits one line of the comma-separated log file at its first comma: element is the text before
the comma (empty if the line starts with a comma), updatedLine the text after it (empty if the
comma is the last character). Example: removeFirstElement("Violated,a,b") returns
("Violated", "a,b"). If the line contains no comma, element is the whole line and
updatedLine is empty. Fields are not unquoted, so an element must not contain a comma.
Called repeatedly to read the fields of the log file written by printViolationsToLogFile and printStatisticsToLogFile, by getElements and printViolationsToOutput.
Inputs
| Name | Type | Description |
|---|---|---|
line input | String | One line of log file |
Outputs
| Name | Type | Description |
|---|---|---|
element output | String | Removed element (without ',') |
updatedLine output | String | = line where part upto first \",\" is removed (if \",\" not present, updatedLine=\"\") |