- 62 名前:デフォルトの名無しさん [2005/12/07(水) 01:04:33 ]
- >>61
begin cnt:=0; spos:=0; str:=RichEdit1.Text; PStr:=PChar(str); len:=Length(sword); repeat p:=AnsiPos(sword, PStr+spos); if (p>0) then begin Inc(cnt); Inc(spos, p); with RichEdit1 do begin SelStart:=spos-1; SelLength:=len; SelAttributes.Color:=clRed; end; Inc(spos, len); end; until p=0; ShowMessage(IntToStr(cnt)); end; //ここまで よろしくお願いします。
|

|