WOLFRAM SYSTEM MODELER
scanIntegerScan for the next Integer number and trigger an assert if not present |
SystemModel["Modelica.Utilities.Strings.scanInteger"]
This information is part of the Modelica Standard Library maintained by the Modelica Association.
number = Strings.scanInteger(string); (number, nextIndex) = Strings.scanInteger(string, startIndex=1, unsigned=false, message="");
Function scanInteger scans the string starting at index "startIndex", checks whether the next token is an Integer literal and returns its value as an Integer number, as well as the index directly after the Integer number. An assert is triggered, if the scanned string does not contain an Integer literal with optional leading white space.
string |
Type: String Description: String to be scanned |
---|---|
startIndex |
Default Value: 1 Type: Integer Description: Start scanning of string at character startIndex |
unsigned |
Default Value: false Type: Boolean Description: = true, if Integer token shall not start with a sign |
message |
Default Value: "" Type: String Description: Message used in error message if scan is not successful |
number |
Type: Integer Description: Value of Integer number |
---|---|
nextIndex |
Type: Integer Description: Index of character after the found number |