>>87 function SearchAlphaWord(const str: string; var pl: TPosLenArr): integer; var i: Integer; cnt: Integer; isAlphaPrev: Boolean; isAlphaNow : Boolean; iPrev: Integer; begin isAlphaPrev:=False;
cnt:=0; i:=1;
while (i <= Length(str)) do begin isAlphaNow:=False; iPrev:=i;
if ( (str[i] in LeadBytes)) then begin Inc(i,2); end else begin if (str[i] in ['a'..'z', 'A'..'Z']) then begin isAlphaNow:=True; end; Inc(i); end;
89 名前:デフォルトの名無しさん [2005/12/23(金) 05:35:25 ]
if (not isAlphaPrev) and isAlphaNow then begin Inc(cnt);
if cnt>Length(pl) then begin SetLength(pl, cnt+10); end; pl[cnt-1].Position:=iPrev; end else if isAlphaPrev and (not isAlphaNow) then begin pl[cnt-1].Length:=iPrev-pl[cnt-1].Position; end;