i would like to escape the backslash in swipl when using string_concat.
Scenario 1-
string_concat('stack', ' overflow', Result).
Result = "stack overflow"
Scenario 2-
string_concat('stack', ' \=overflow', Result).
Syntax error: Undefined character escape in quoted atom or string: `\='
Scenario 3-
string_concat('stack', ' \\=overflow', Result).
Result = "stack \\=overflow"
Now, scenario1 behaves as expected. I am faced with a situation explained in scenario2, where in i need to concatenate a string that contains a backslash and equalto. ie, string1 has just text, string2 has text with \= also inside it, and my result should be string1 and string2 concatenated. However, using just \= as in scenario2 results in an error asking me to escape the sequence. Now, escaping as in scenario3 gives me two backslashes and the equal sign. I do not want two backslashes.
My output should be exactly stack \=overflow
. Is there some escape sequence or method that I am missing here?
Thanks!