getFirstName function
Requirements.Internal.getFirstName
ยท source
Get first name of a Modelica path name
Extends Modelica.Icons.Function
Returns the first name of the Modelica path name path, the part before the first dot:
getFirstName("Root.a.b") = "Root". If path contains no dot, path is
returned; if it starts with a dot, the empty string. The counterpart is
removeFirstName.
Applied to getInstanceName(), it gives the name of the simulated root model.
Verify.PrintViolations uses it for the default
names of the log file and the HTML report (<root name>_log.txt, <root name>_log.html)
and for the heading of the summary; the FFT blocks of
ChecksInFixedWindow_withFFT use it for the
name of their result directory.
Inputs
| Name | Type | Description |
|---|---|---|
path input | String | Modelica path name, e.g. \"Root.a.b\" |
Outputs
| Name | Type | Description |
|---|---|---|
head output | String | = path upto but not including the first \".\" (if \".\" not present, head=path) |