scanIdentifierScan simple identifiers |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
(nextIndex, identifier) = scanIdentifier(string, startIndex=1);
Starts scanning of "string" at position "startIndex". First skips white space and scans afterwards a Modelica identifier, i.e., a sequence of characters starting with a letter ("a".."z" or "A".."Z") followed by letters, digits or underscores ("_").
If successful, the function returns nextIndex = index of character directly after the found identifier, as well as the identifier as string in the second output argument.
If not successful, on return nextIndex = startIndex and the second output argument is an empty string.
string |
Type: String |
---|---|
startIndex |
Default Value: 1 Type: Integer Description: Index where scanning starts |
nextIndex |
Type: Integer Description: Index after the found token (success=true) or index at which scanning failed (success=false) |
---|---|
identifier |
Type: String Description: Value of identifier token |