How to create a string with a single backslash?

Started by ale870, September 15, 2009, 02:48:52 AM

Previous topic - Next topic

ale870

Hello,



I found a problem: I need to create a string with "".



See here:


> (setq a (string "1" {} "2"))
"1\2"


Well, I tried in many ways, but I get an error, or I get a string with a double "\" instead a single "". I need it to create a Windows network path:



\myservershared_dirmyfile.txt



It seems incredible, but I cannot find a way, in windows (but I even made some tests in Liunux and the results are similar) to compose that string.



Please can you help me?



Thank you!
--

ale870

#1
UPDATE: Sorry, I'm eating my brain! I made a mistake.



See here:


> (setq a (string "1\2"))
"1\2"
> (length a)
3


The final string is correct: 3 characters long.



Topic closed because I'm stupid  :-)
--