WOLFRAM SYSTEM MODELER
findFind first occurrence of a string within another string |
SystemModel["Modelica.Utilities.Strings.find"]
This information is part of the Modelica Standard Library maintained by the Modelica Association.
index = Strings.find(string, searchString); index = Strings.find(string, searchString, startIndex=1, caseSensitive=true);
Finds first occurrence of "searchString" within "string" and return the corresponding index. Start search at index "startIndex" (default = 1). If the optional argument "caseSensitive" is false, lower and upper case are ignored for the search. If "searchString" is not found, a value of "0" is returned.
string |
Type: String Description: String that is analyzed |
---|---|
searchString |
Type: String Description: String that is searched for in string |
startIndex |
Default Value: 1 Type: Integer Description: Start search at index startIndex |
caseSensitive |
Default Value: true Type: Boolean Description: = false, if lower and upper case are ignored for the search |
index |
Type: Integer Description: Index of the beginning of the first occurrence of 'searchString' within 'string', or zero if not present |
---|