to get a " you have to use "\""
Registered forum members do not see this ad.
Dear coders
I am trying to include " when using strcat
Afaik you need to use \ or / in combinatiuon with extra " to get "something here" when using strcat
So I want to do this
(strcat "sometext" "" EXTRATEXT"" )
As you can see the EXTRATEXT needs to be in quotes
I tried
(strcat "sometext" "\" EXTRATEXT""\ )
but also
(strcat "sometext" \"" EXTRATEXT"\" )
and a few other but none of them works
How can I strcat something that needs to stay in quotes?
to get a " you have to use "\""
THNX M8 I just forgot the extra "![]()
RLX
What the hell am I doing wrong
(strcat "sometext" "\"" EXTRATEXT"\"" )
; error: bad argument type: stringp nil
_$ (strcat "sometext" "\"" EXTRATEXT""\" )
("_> ")
; error: bad argument type: stringp nil
_$
You could also do it like this
Code:(strcat "sometext " (chr 34) "EXTRATEXT" (chr 34))
Well i think i need someto use at my pc coz i am getting wicked results
$ (strcat "sometext " (chr 34) "EXTRATEXT" (chr 34))
"sometext \"EXTRATEXT\""
What in the world is the \ doing up there?
RLX
Light bulb is starting to give light but in the end it turns to be STRINGP NIL
_$ (setq extratext "some more text")
"some more text"
_$ (strcat "sometext" "\"" extratext "\"")
"sometext\"some more text\""
_$ (setq extratext nil)
nil
_$ (strcat "sometext" "\"" extratext "\"")
; error: bad argument type: stringp nil
_$
I am getting confused by this
READING CODE IS IMPORTANT
And tricking me is nasty LOL
Bookmarks