i'm having a problem with the replace_string function, whatever values for len1 and len2 i pass it, it wont replace something at the end. i'll explain by way of example
i have something similar to
CODE
string8 artist = "whatever"; // you get the idea
string8 title = "whatever2";
string8 line = "i like fish, but not more than %artist% when they play %title%";
line.replace_string("%artist%", 8, artist, artist.length(),0,0);
line.replace_string("%title%", 7, title, title.length(), 0, 0);
and when run, the %artist% replaces fine, but the %title% stays as it is.... weird.
it doesn't seem to matter what values i pass as len1 and len2, but if there's something after the %title% in line then it fixes it, but surely that's not right.... i'm figuring i'm just not giving it right values or something...
can anyone shed some light on this? i'm stuffed