.Modelica.Utilities.Strings.findLast

Information

Syntax

index = Strings.findLast(string, searchString);
index = Strings.findLast(string, searchString,
                         startIndex=length(string), caseSensitive=true,

Description

Finds first occurrence of "searchString" within "string" when searching from the last character of "string" backwards, and return the corresponding index. Start search at index "startIndex" (default = 0; if startIndex = 0, search starts at length(string)). 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 findLast
  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 = 0) = 0 "Start search at index startIndex. If startIndex = 0, start at length(string)";
  input Boolean caseSensitive = true "= false, if lower and upper case are ignored for the search";
  output Integer index "Index of the beginning of the last occurrence of 'searchString' within 'string', or zero if not present";
end findLast;

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f