Hello new to this site - looking for help counting specific characters from a single word input by a text box,

Thanks
Wes

probably length. what you're using? editbox,memo,etc?

Hi,
I am new to delphi and I have a delphi designed dos point of sale program.
I need assistance to open the program for a small reward.
If you are interested I can mail you the executables and further instructions.

procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(inttostr(length(trim(edit1.Text))));
end;

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

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

this is very simple, i'll give you the answer but i'm not sure how much you'll learn.

counter:=0;
for i:=1 to length(s) do
if s=your_character then
inc(counter)