Jump to content
Sign in to follow this  

Counting characters

Recommended Posts

I feel really silly asking this, especially considering there's a help file, but I can't seem to find out how to count the number of occurences of a specific character.

What I would like to do is check a string, for example (4+5)+(3+2) for the number of occurences of the "+" character, and then I can cycle through each one using StringInStr($string,"+",$occurence) to get the location and then check if it is inside brackets or not.

So without knowing how many there are, the only way I can think of to do this is by going through every character one by one, which in long strings is inappropriate. Can someone help me please?

Thanks in advance.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...