Liking cljdoc? Tell your friends :D

pebblestream.parse-str


parse-strclj/s

(parse-str s)

Parses a double-quoted string argument, or returns nil if s is not one. Same value as parse-str*, without the warnings.

Parses a double-quoted string argument, or returns nil if s is not one.
Same value as parse-str*, without the warnings.
sourceraw docstring

parse-str*clj/s

(parse-str* s)

Parses a double-quoted string argument. Returns {:value v :warnings [...]}, or nil if s is not a valid quoted string.

Two escape styles are accepted inside the quotes: \x a backslash escapes the next character, so " is a quote and \ a backslash "" a doubled quote is one quote, as in an Excel formula

A quote that is neither escaped nor doubled makes the string invalid (nil), as does a backslash with nothing after it. Every string the backslash-only parser accepted parses to the same value here: that parser rejected any unescaped quote, so no string it accepted contained a doubled one.

A backslash before any character other than " or \ is accepted, as before, and also produces an :ambiguous-backslash warning naming its index in the trimmed text.

Parses a double-quoted string argument. Returns {:value v :warnings [...]},
or nil if s is not a valid quoted string.

Two escape styles are accepted inside the quotes:
  \x  a backslash escapes the next character, so \" is a quote and \\ a backslash
  ""  a doubled quote is one quote, as in an Excel formula

A quote that is neither escaped nor doubled makes the string invalid (nil),
as does a backslash with nothing after it. Every string the backslash-only
parser accepted parses to the same value here: that parser rejected any
unescaped quote, so no string it accepted contained a doubled one.

A backslash before any character other than " or \ is accepted, as before,
and also produces an :ambiguous-backslash warning naming its index in the
trimmed text.
sourceraw docstring

quote-strclj/s

(quote-str s)

Writes s as a quoted string argument that parse-str reads back as s, with no warnings. Quotes are doubled (the Excel form) and backslashes are escaped, since a lone backslash would otherwise escape the character after it.

Writes s as a quoted string argument that parse-str reads back as s, with no
warnings. Quotes are doubled (the Excel form) and backslashes are escaped,
since a lone backslash would otherwise escape the character after it.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close