Delphi初心者のための寺子屋at TECH
Delphi初心者のための寺子屋 - 暇つぶし2ch76:デフォルトの名無しさん
05/12/15 07:29:16
>>74
function CountAlpha(var str:    AnsiString):    Integer;
var
    i:    Integer;
    cnt:    Integer;
begin
    cnt:=0;
    i:=0;

    while (i <= Length(str)) do
    begin
        if ( (str[i] in LeadBytes)) then
        begin
            Inc(i,2);
        end
        else
        begin
            if (str[i] in ['a'..'z']) or (str[i] in ['A'..'Z']) then
            begin
                Inc(cnt);
            end;
            Inc(i);
        end;

    end;
    result:=cnt;
end;
//ここまで
よろしくお願いします


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