.Modelica.Utilities.Strings.find

Information

Syntax

index = Strings.find(string, searchString);
index = Strings.find(string, searchString, startIndex=1,
                     caseSensitive=true);

Description

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.

Interface

function find
  extends Modelica.Icons.Function;
  input String string "String that is analyzed";
  input String searchString "String that is searched for in string";
  input Integer startIndex(min = 1) = 1 "Start search at index startIndex";
  input Boolean caseSensitive = true "= false, if lower and upper case are ignored for the search";
  output Integer index "Index of the beginning of the first occurrence of 'searchString' within 'string', or zero if not present";
end find;

Generated at 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos