.Modelica.Utilities.Strings.Advanced.scanString

Information

Syntax

(nextIndex, string2) = scanString(string, startIndex=1);

Description

Starts scanning of "string" at position "startIndex". First skips white space and scans afterwards a string according to the Modelica grammar, i.e., a string enclosed in double quotes.

If successful, the function returns nextIndex = index of character directly after the found string, as well as the string value in the second output argument.

If not successful, on return nextIndex = startIndex and the second output argument is an empty string.

See also

Strings.Advanced.

Interface

pure function scanString
  extends Modelica.Icons.Function;
  input String string;
  input Integer startIndex(min = 1) = 1 "Index where scanning starts";
  output Integer nextIndex "Index after the found token (success=true) or index at which scanning failed (success=false)";
  output String string2 "Value of String token";
end scanString;

Generated at 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos