26-04-2011, 06:10 PM
جرب هدا
للتجربة :
والسلام عليكم
كود :
function FindMe(S: string): boolean;
//add as much strings as you want to this Static array
const Me: array[1..3] of string = ('delphi','Delphi','DELPHI');
var
i: integer;
begin
for i := 1 to 3 do
begin
// SameText is Case insensitive .
result := SameText(S,Me[i]);
if result // if True
then break; // Stop the For Loop
end;
end;للتجربة :
كود :
button2.Enabled:=FindMe(trim(edit1.Text));والسلام عليكم

