WrongInstall
Member
I can't find any posts about this, so I figured I'd post about it. I'm 90% sure string_pos_ext is bugged when targeting html. It seems to completely ignore the starting index parameter, and behave like string_pos instead. I made a simple bit of code in a draw gui event to demonstrate:
If you run this in windows, it'll output 6 and 35. In HTML it'll output 6 both times. I was going to file a bug report, but figured I'd confirm it here first. I'm running 2.3 btw. Anyone else get the same behavior?
Code:
text = "Here is some text to show that string_pos_ext does not work in html.";
// find the first occurence of "i"
i_first = string_pos("i", text);
// find the second occurance of "i"
i_second = string_pos_ext("i", text, i_first);
draw_text(30, 30, text);
draw_text(30, 50, "The first 'i' is at " + string(i_first) + ", the second is at " + string(i_second));