09.06.2012, 19:38
pawn Code:
#define STRING_TO_FOUND "hi"
#define STRING_TO_ADD "hello"
new text[128] = "hi, whats up? im here for u";
if(strfind(text, STRING_TO_FOUND, true) != -1) {
new pos = strfind(text, STRING_TO_FOUND, true);
new length = strlen(STRING_TO_FOUND);
strdel(text, pos, length);
strins(text, STRING_TO_ADD, pos, length);
}
print(text);