Page 1 of 1

count chr in string how!???

Posted: Tue Aug 16, 2005 3:41 pm
by doodlemunch
how can i count how many of a chr is in a string
becuse i have a string and i want to know how many of chr(90) are for exampel how can i count that ??? with any chr i mean 90 is an exampel just to say i dont know how i can search that in a string thanks!!!
i am a newbie sstill with this stuff and my englischt its even worst srry

Posted: Tue Aug 16, 2005 3:46 pm
by Dare2

Code: Select all

Result = CountString(String$, StringToCount$)
eg

Code: Select all

Char90Count = CountString(Source, chr(90))
EDIT:

Finding:

Code: Select all

Position = FindString(String$, StringToFind$, StartPosition)
This is in the String section of the help docs.

Hope that is what you were after.