.Modelica.Utilities.Strings.count

Information

Syntax

Strings.count(string, searchString)
Strings.count(string, searchString, startIndex=1,
                     caseSensitive=true)

Description

Returns the number of non-overlapping occurrences of string "searchString" in "string". The search is started at index "startIndex" (default = 1). If the optional argument "caseSensitive" is false, for the counting it does not matter whether a letter is upper or lower case.

Interface

function count
  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 count";
  output Integer result "Number of occurrences of 'searchString' in 'string'";
end count;

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39