1.3.0 permalink Arrow_down_16x16

char-escape-string

clojure.core

Returns escape string for char or nil if none

1 Example top

  • ;; simple examples
    
    user=> (char-escape-string \newline)
    "\\n"
    user=> (char-escape-string \c) ; no escape sequence for 'c'
    nil
    user=> (char-escape-string \tab)
    "\\t"
    user=> (char-escape-string \backspace)
    "\\b"
    user=>
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core_print.clj:164 top

(def ^{:tag String 
       :doc "Returns escape string for char or nil if none"
       :added "1.0"}
  char-escape-string
    {\newline "\\n"
     \tab  "\\t"
     \return "\\r"
     \" "\\\""
     \\  "\\\\"
     \formfeed "\\f"
     \backspace "\\b"})
Vars in clojure.core/char-escape-string:
Used in 0 other vars

Comments top

No comments for char-escape-string. Log in to add a comment.