Delphi初心者のための寺子屋 at TECH
[2ch|▼Menu]
62:デフォルトの名無しさん
05/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;
//ここまで
よろしくお願いします。


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5231日前に更新/190 KB
担当:undef