str2 = substituteChar(str, i, c);
A single character of a string str is substituted by a given character c at index i.
str2 := substituteChar("Hello", 2, "a"); -> str2 = "Hallo" str2 := substituteChar("Hello", 3, ""); -> str2 = "Helo"
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;