WOLFRAM SYSTEM MODELER

skipLineComments

Scan comments and white space

Wolfram Language

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

Information

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

Syntax

nextIndex = skipLineComments(string, startIndex);

Description

Starts scanning of "string" at position "startIndex". First skips white space and scans afterwards a Modelica (C/C++) line comment, i.e., a sequence of characters that starts with "//" and ends with an end-of-line "\n" or with the end of the string. If end-of-line is reached, the function continues to skip white space and scanning of line comments until end-of-string is reached, or another token is detected.

If successful, the function returns nextIndex = index of character directly after the found line comment.

If not successful, on return nextIndex = startIndex.

See also

Strings.Advanced.

Syntax

nextIndex = skipLineComments(string, startIndex)

Inputs (2)

string

Type: String

startIndex

Default Value: 1

Type: Integer

Outputs (1)

nextIndex

Type: Integer