計算字符串中空格個數(shù) 在delphi編程中,輸入一個字符,分別統(tǒng)計出其中的英文字母,空格,數(shù)字字符的個數(shù)?
在delphi編程中,輸入一個字符,分別統(tǒng)計出其中的英文字母,空格,數(shù)字字符的個數(shù)?for i := 0 to length(str_input) -1 do case str_input[i] of
在delphi編程中,輸入一個字符,分別統(tǒng)計出其中的英文字母,空格,數(shù)字字符的個數(shù)?
for i := 0 to length(str_input) -1 do case str_input[i] of 32 : inc(space_counter) //空格 48..57 : inc(digit_counter) //數(shù)字 65..90 : inc(char_counter) //大寫字母 97..122 : inc(char_counter)//小寫字母 end