07.12.2011, 08:36
Hello, how i can escepe backslashes from string? I have a lot of dialogs type inputtext, and i want to escaping backslashes: "\". I can't do it with normal replace text's, compilator shows to me errors when i want.
print("\\");
stock EscapeBackslashes(givenString[])
{
new pos, editingString[64];
memcpy(editingString, givenString, 0, 64 * 4);
pos = strfind(editingString, "\\", true);
while(pos != -1)
{
strdel(editingString, pos, pos + 1);
pos = strfind(editingString, "\\", true, pos + 1);
}
return editingString;
}