How to count Uppercase Letter from a String

Reply

Join Date: Jun 2006
Posts: 3
Reputation: sandeep.kharat is an unknown quantity at this point 
Solved Threads: 0
sandeep.kharat's Avatar
sandeep.kharat sandeep.kharat is offline Offline
Newbie Poster

How to count Uppercase Letter from a String

 
0
  #1
Jun 28th, 2006
Hi all,

How to count Uppercase Letter from a String.

Please help

Regards,
Sandeep
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: How to count Uppercase Letter from a String

 
0
  #2
Jun 28th, 2006
  1. Function NumUpperCase(x)
  2. a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  3. count = 0
  4.  
  5. for c = 1 to Len(x)
  6. if InStr(a,Mid (x,c,1)) > 0 then count = count+1
  7. next
  8.  
  9. NumUpperCase = count
  10. End Function
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC