.Modelica.Utilities.Strings.scanIdentifier

Information

Syntax

             identifier = Strings.scanIdentifier(string);
(identifier, nextIndex) = Strings.scanIdentifier(string, startIndex=1, message="");

Description

Function scanIdentifier scans the string starting at index "startIndex", checks whether the next token is an Identifier and returns its value as a string, as well as the index directly after the Identifier. An assert is triggered, if the scanned string does not contain an Identifier with optional leading white space.

Interface

function scanIdentifier
  extends Modelica.Icons.Function;
  input String string "String to be scanned";
  input Integer startIndex(min = 1) = 1 "Start scanning of identifier at character startIndex";
  input String message = "" "Message used in error message if scan is not successful";
  output String identifier "Value of Identifier";
  output Integer nextIndex "Index of character after the found identifier";
end scanIdentifier;

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39