count chr in string how!???

Everything else that doesn't fall into one of the other PB categories.
doodlemunch
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Apr 05, 2005 11:20 pm

count chr in string how!???

Post 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
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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.
@}--`--,-- A rose by any other name ..
Post Reply