Programming & Tools/Delphi2010. 4. 29. 16:23

var
  before, after : string;

begin
  // Try to replace all occurrences of a or A to THE
  before := 'This is a way to live A big life';

  after  := StringReplace(before, ' a ', ' THE ',
                          [rfReplaceAll, rfIgnoreCase]);
  ShowMessage('Before = '+before);
  ShowMessage('After  = '+after);
end;

Show full unit code
   Before = This is a way to live A big life
   After  = This is THE way to live THE big life
 
Posted by 다크쌍피