.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 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos