columnIndex function

Requirements.LinearAnalysis.columnIndex  ยท source

Icon of columnIndex

The 1-based index of a name in a comma-separated header (quotes and blanks ignored: a name holds neither), 0 when it is not there

Extends Modelica.Icons.Function

Returns the 1-based position of name among the comma-separated cells of header, or 0 if no cell matches. Before the comparison, blanks and double quotes are removed from each cell, so "f", f and f all match the name f (a column name must therefore contain neither). The first matching cell is returned. Used by readModeColumn and hasModeColumn to locate a column of a mode table.

Copyright © 2026 Model Based Innovation LLC. All rights reserved.

Inputs

NameTypeDescription
header inputStringComma-separated header row
name inputStringColumn name to search for

Outputs

NameTypeDescription
index outputInteger1-based index of name in header (0: not found)