functionsubstituteChar
A single character of a string str is substituted by a given character c at index i.
Extends from Modelica.Icons.Function (Icon for functions).
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"
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | str | string to be considered | |
| Integer | i | index of character inside str to be substituted | |
| String | c | character that replaces the character in str at index i |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | str2 | result string |