replaceReplace non-overlapping occurrences of a string from left to right |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
Strings.replace(string, searchString, replaceString); Strings.replace(string, searchString, replaceString, startIndex=1, replaceAll=true, caseSensitive=true);
Search in "string" for "searchString" and replace the found substring by "replaceString".
The function returns the "string" with the performed replacements.
string |
Type: String Description: String to be modified |
---|---|
searchString |
Type: String Description: Replace non-overlapping occurrences of 'searchString' in 'string' with 'replaceString' |
replaceString |
Type: String Description: String that replaces 'searchString' in 'string' |
startIndex |
Default Value: 1 Type: Integer Description: Start search at index startIndex |
replaceAll |
Default Value: true Type: Boolean Description: = false, if only the first occurrence is replaced, otherwise all occurrences |
caseSensitive |
Default Value: true Type: Boolean Description: = false, if lower and upper case are ignored when searching for searchString |
result |
Type: String Description: Resultant string of replacement operation |
---|