.FaultTriggering.Utilities.Internal.Records.OutputHandling.substituteChar

Information

Syntax

str2 = substituteChar(str, i, c);

Description

A single character of a string str is substituted by a given character c at index i.

Example

  str2 := substituteChar("Hello", 2, "a");
               -> str2 = "Hallo"
               
  str2 := substituteChar("Hello", 3, "");
               -> str2 = "Helo"

Interface

function substituteChar
  import Modelica.Utilities.Strings.*;
  extends Modelica.Icons.Function;
  input String str "string to be considered";
  input Integer i "index of character inside str to be substituted";
  input String c "character that replaces the character in str at index i";
  output String str2 "result string";
end substituteChar;

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