RAD Studio VCL Reference
StrUtils.AnsiReplaceText Function

Replaces all case-insensitive matches of a substring with another string.

function AnsiReplaceText(const AText: string; const AFromText: string; const AToText: string): string;
AnsiString AnsiReplaceText(const AnsiString AText, const AnsiString AFromText, const AnsiString AToText);


Call AnsiReplaceText to scan the string specified by AText and replace all occurrences of the string specified by AFromText with the string specified by AToText. Occurrences of AFromText are identified by a case-insensitive comparison that uses the current system locale. The identification of substrings is not recursive: if the substitution of AToText results in a new match for AFromText, that match is not replaced. 


Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!