.Modelica.Utilities.Strings.scanString

Information

Syntax

             string2 = Strings.scanString(string);
(string2, nextIndex) = Strings.scanString(string, startIndex=1, message="");

Description

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

Interface

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

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