Counting characters...
Posted: Sun Mar 25, 2007 2:16 pm
I was wondering if there is a way to count characters given specific conditions. I need the methods for doing the following:
146381236x68321676814x
How would I count the characters from the beginning of the string to x? In this example, it would be 9.
What about in between x and x? In this example, it would be 11.
How could I take the sum of the first characters before x? In this example, it would be 34.
What about in between x and x? In this example, it would be 52.
How could I find the ratio of the characters before x and the characters between x and x, each counted respectively? In this example, it would be 9:11.
I worded these the best that I could... please help if you know! Thanks for your time.
146381236x68321676814x
How would I count the characters from the beginning of the string to x? In this example, it would be 9.
What about in between x and x? In this example, it would be 11.
How could I take the sum of the first characters before x? In this example, it would be 34.
What about in between x and x? In this example, it would be 52.
How could I find the ratio of the characters before x and the characters between x and x, each counted respectively? In this example, it would be 9:11.
I worded these the best that I could... please help if you know! Thanks for your time.