How can I count uppercase and lowercase in every text I input?

Help me anyone! ASAP!
If I input something to TextBox, it will only counting the uppercase and the lowercase. How can I make that? My logic is bad :frowning_face:
example
SunSHINE
Uppercase: 6
Lowercase: 2

set global uppercase to 0
set global lowercase to 0
for each i from 1 to length(Textbox1.Text)
  set local c to segment(Textbox1.Text,i,1)
  if upper(c) = c then 
    set global uppercase to global uppercase + 1
  else if lower(c) = c then
    set global lowercase to global lowercase + 1
end for each

(I forget the names of the text blocks to upper and lower case )

1 Like

4 Likes

Thank you guys! @ABG @Kevinkun
image

Handles numbers and non alpha-numeric characters:

image

2 Likes

Anyway, I use this one.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.