.Modelica.Utilities.Strings.replace

Information

Syntax

Strings.replace(string, searchString, replaceString);
Strings.replace(string, searchString, replaceString,
                startIndex=1, replaceAll=true, caseSensitive=true);

Description

Search in "string" for "searchString" and replace the found substring by "replaceString".

The function returns the "string" with the performed replacements.

Interface

function replace
  extends Modelica.Icons.Function;
  input String string "String to be modified";
  input String searchString "Replace non-overlapping occurrences of 'searchString' in 'string' with 'replaceString'";
  input String replaceString "String that replaces 'searchString' in 'string'";
  input Integer startIndex = 1 "Start search at index startIndex";
  input Boolean replaceAll = true "= false, if only the first occurrence is replaced, otherwise all occurrences";
  input Boolean caseSensitive = true "= false, if lower and upper case are ignored when searching for searchString";
  output String result "Resultant string of replacement operation";
end replace;

Generated at 2024-12-24T19:25:53Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos