I think it's bugged...
Shouldn't it be more like this?:
Otherwise you might be skipping over instances of 'remover', ne?
However, I am just a clueless newbie.. I don't even know what the difference between SubString() (the one you used) and SubStringBJ(), the one you get when you convert the substring function in WE to custom text... but that's what it seems it should be...
edit: forgot about Markiz's observation.. changed to fix it.
edit 2: just learned what BJ means.. but I dont think it affects the code... ? o.0
edit 3 >.> maybe SubString works differently from SubStringBJ in that it's noninclusive or sth...? but it still looks like it only tests by sections.
Shouldn't it be more like this?:
local integer x = StringLength(remover) - 1
...
loop
exitwhen i>end
if SubString(mainstring,i,i+x) != remover then
set returner = returner + SubString(mainstring,i,i)
set i = i+1
else
set i = i + x
endif
endloopOtherwise you might be skipping over instances of 'remover', ne?
However, I am just a clueless newbie.. I don't even know what the difference between SubString() (the one you used) and SubStringBJ(), the one you get when you convert the substring function in WE to custom text... but that's what it seems it should be...
edit: forgot about Markiz's observation.. changed to fix it.
edit 2: just learned what BJ means.. but I dont think it affects the code... ? o.0
edit 3 >.> maybe SubString works differently from SubStringBJ in that it's noninclusive or sth...? but it still looks like it only tests by sections.