WOLFRAM SYSTEM MODELER

scanString

Scan string

Wolfram Language

In[1]:=
SystemModel["Modelica.Utilities.Strings.Advanced.scanString"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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.

Syntax

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

Inputs (2)

string

Type: String

startIndex

Default Value: 1

Type: Integer

Description: Index where scanning starts

Outputs (2)

nextIndex

Type: Integer

Description: Index after the found token (success=true) or index at which scanning failed (success=false)

string2

Type: String

Description: Value of String token