var before, after : string;begin before := 'It is a kind of fruit'; after := StringReplace(before, ' a ', ' THE ', [rfReplaceAll, rfIgnoreCase]);
{แทนที่ a ด้วยคำว่า THE}
ShowMessage('Before = '+before); ShowMessage('After = '+after);end;
จะได้
Before = It is a kind of fruit
After = It is THE kind of fruit
ไม่มีความคิดเห็น:
แสดงความคิดเห็น