Esceping Backslashes
#1

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.
Reply
#2

To insert a backslash into a string, enter two, example:

pawn Код:
print("\\");
Reply
#3

@up. doesnt's work:

pawn Код:
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;
}
And this not delete a backslashes from strings.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)