Para este cayo tengo esta otra funcion que podria ser muy ůtil:
{-------------------------------------------------------------------------------------------------
esta funcion es original de Foxpro/Visual Foxpro, le agregas una lista de elementos y te devuelve
true si la cadena contiene alguno de los elementos de la lista y false si no lo tiene.
ejemplo de uso:
VariableTexto:='gato';
if Inlist(VariableTexto,['perro','gato','canario'])=true then
begin
//es un gato
.....
end;
--------------------------------------------------------------------------------------------------}
Function Inlist(aCadena:string; aLista: array of String):boolean;
var i:Integer;
begin
Result:=false;
for i:=Low(aLista) to High(aLista) do
begin
if Uppercase(aCadena)=Uppercase(aLista[i]) then
begin
result:=true;
break;
end;
end;
end;
|