1
를 문자열 구분 기호를 유지하면서 나는과 같이 라켓의 목록을 가지고 :인쇄 원시 제어 문자 출력 (라켓)
'(some-symbol
"some\ntext\ngoes in\nhere")
내가 \n
같은 제어 문자는 그 값으로 변환되도록 그것을 밖으로 인쇄 할 ,이 경우 줄 바꿈. 그러나 출력 문자열에 write
또는 print
의 문자열에 따옴표 (예 : 구분 기호)를 보존하기를 원합니다. display
함수는 이미 내가 원하는 첫 번째 부분을 수행하지만, \"
처럼 이스케이프 처리되지 않은 따옴표는 제거합니다. 예컨대 :
[email protected]> (displayln '(some-symbol "some\ntext\ngoes in\nhere")) ;; I want the linefeeds as produced here
(some-symbol some
text
goes in
here)
[email protected]> (println '(some-symbol "some\ntext\ngoes in\nhere")) ;; But I also want the quotation marks as preserved here
'(some-symbol "some\ntext\ngoes in\nhere")
[email protected]>
\"
같은 문자열 구분 기호를 탈출하지 않고 라켓 출력 효과의 종류를 얻을 수있는 몇 가지 방법이 있나요? 또한 출력에서리스트 앞에있는 '
문자를 원하지 않습니다.
이것은 내가 원하는 것을 수행합니다. 고맙습니다. 미안하지만 질문이 명확하지 않은 경우. – GDP2