function GetStrPointer(value:string):Integer;
var
i :Integer;
begin
Result:= -1;
value := LowerCase(value);
for i := 1 to Length(value) do
begin
if value in ['a','b'] then // [写入你所要检测的字母]
begin
Result:= i;
Break;
end;
end;
function GetStrPointer(value:string):Integer;
var
i :Integer;
begin
Result:= -1;
value := LowerCase(value);
for i := 1 to Length(value) do
begin
if value in ['a'..'z'] then
begin
Result:= i;
Break;
end;
end;
function IsLetter (s : Char) : Boolean;
begin
Result := ((s in ['a'..'z']) or (s in ['A'..'Z']));
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i : Integer;
s : string;
begin
Memo1.Clear;
s := '10ml';
for i := 1 to Length(s) do
if IsLetter(s) then Memo1.Lines.Add(s);
end;