-
sourceText.split problem
in a range selector, I have the following code on a color amount. If the 10th word starts with an “s” or S”, I want it to change the color.
The problem, is if a word before it has 2 spaces before it. It advances the split count; however, the range selector that doesn’t count the double space as a word. (so word 10 is now at text.sourceText.split(” “)[11])
Anyone have any idea of a workaround?
y=text.sourceText.split(" ")[10][0];
if ((y == "s") || (y == "S")) 100 else 0