Does clojure have raw string?

前端 未结 3 1551
青春惊慌失措
青春惊慌失措 2020-12-09 09:59

In Python, I can prefix an r to a string literal (raw string) to tell the interpreter not translate special characters in the string:

>>&g         


        
3条回答
  •  猫巷女王i
    2020-12-09 10:48

    May be of use to a literal regular expression for such purposes.

    user=> #"abc\nsdf#$%\^"
    #"abc\nsdf#$%\^"
    user=> (type #"abc\nsdf#$%\^")
    java.util.regex.Pattern
    user=> (println (str #"abc\nsdf#$%\^"))
    abc\nsdf#$%\^
    nil
    

提交回复
热议问题