Mo ·
Reverse find from end to start seems to be broken in the String Find primitive:
I want position 3 not 9 when reversed position is true. Do i miss something?
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Mo ·
Reverse find from end to start seems to be broken in the String Find primitive:
I want position 3 not 9 when reversed position is true. Do i miss something?
theun ·
Yep, you did 😉
The effect of the reverse "switch" just differs a bit from what you expected. The primitive finds the first occurrence of a given sub-string inside the string, starting either from left or from right (=reverse). As there is only one dot in your example, in both cases it will find the same dot at the same position, and output the same integer value (9). If you would search for an "m" instead it will find an m either at position 0 or at position 7, depending on the true/false input of reverse.
See also page 223 of the component reference. [old link]
regards, Theun
Mo ·
Ah i see. Great. No problems anyway, then. 🙂
Thanks!
Wrote something here? To have a post removed or your name hidden, write to [email protected].