| | |
Delphi character count
![]() |
•
•
Join Date: Dec 2006
Posts: 171
Reputation:
Solved Threads: 16
•
•
•
•
thank you but this gives the total length of the text - if 'barbara' is entered and the character is 'a' - the result must be 3
your help appreciated
counter:=0;
for i:=1 to length(s) do
if s[i]=your_character then
inc(counter)
Last edited by radu84; May 15th, 2007 at 1:25 am.
![]() |
Similar Threads
- character count (C++)
- Count.Java (Java)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: plz help with game
- Next Thread: Object or Class Type Required? (Delphi)
| Thread Tools | Search this Thread |





