StringReplace function<br>------------------------------------------<br>Returns a string with occurrences of one substring replaced by another <br>substring.<br><br>Unit<br>Sysutils<br><br>Category<br><br>string handling routines<br><br>type<br> TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);<br>function StringReplace(const S, OldPattern, NewPattern: string<br>; Flags: TReplaceFlags): string;<br><br>Description<br><br>StringReplace replaces occurrences of the substring specified by OldPattern <br>with the substring specified by NewPattern. StringReplace assumes that the <br>source string, specified by S, may contain Multibyte characters.<br><br>If the Flags parameter does not include rfReplaceAll, StringReplace only <br>replaces the first occurrence of OldPattern in S. Otherwise, all instances <br>of OldPattern are replaced by NewPattern.<br><br>If the Flags parameter includes rfIgnoreCase, The comparison operation is <br>case insensitive.<br><br>