Utils for parsing string values. Provides a thin Clojure wrapper around java native parsing functions such as java.lang.Float/parseFloat. Unlike the original java functions, these native-Clojure functions can be used as higher-order functions in maps, function arguments, etc. Each function also provides an optional default-value which will be returned if there is an exception during parsing.
Utils for parsing string values. Provides a thin Clojure wrapper around java native parsing functions such as java.lang.Float/parseFloat. Unlike the original java functions, these native-Clojure functions can be used as higher-order functions in maps, function arguments, etc. Each function also provides an optional default-value which will be returned if there is an exception during parsing.
(edn-parsible data)
Traverses a data structure to ensure it can be serialized with pr-str
and read via
clojure.tools.reader.edn/read-string. All non-parsible content is replaced
with ::non-parsible-object
.
Traverses a data structure to ensure it can be serialized with `pr-str` and read via clojure.tools.reader.edn/read-string. All non-parsible content is replaced with `::non-parsible-object`.
(parse-byte str-val & opts)
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Byte/parseByte. Parses the string str-val into a byte. If the optional default-val is specified, it will be returned in the event of an exception.
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Byte/parseByte. Parses the string str-val into a byte. If the optional default-val is specified, it will be returned in the event of an exception.
(parse-double str-val & opts)
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Double/parseDouble. Parses the string str-val into a double. If the optional default-val is specified, it will be returned in the event of an exception.
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Double/parseDouble. Parses the string str-val into a double. If the optional default-val is specified, it will be returned in the event of an exception.
(parse-float str-val & opts)
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Float/parseFloat. Parses the string str-val into a float. If the optional default-val is specified, it will be returned in the event of an exception.
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Float/parseFloat. Parses the string str-val into a float. If the optional default-val is specified, it will be returned in the event of an exception.
(parse-float G__73146)
(parse-float G__73150 G__73151)
Inputs: ([str-val :- s/Str] [str-val default-val]) Returns: s/Num
( [str-val] [str-val :default default-val] ) A thin wrapper around js/parseFloat. Parses the string str-val into a float. If the optional default-val is specified, it will be returned in the event of an NaN.
Inputs: ([str-val :- s/Str] [str-val default-val]) Returns: s/Num ( [str-val] [str-val :default default-val] ) A thin wrapper around js/parseFloat. Parses the string str-val into a float. If the optional default-val is specified, it will be returned in the event of an NaN.
(parse-int str-val & opts)
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Integer/parseInt Parses the string str-val into a integer. If the optional default-val is specified, it will be returned in the event of an exception.
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Integer/parseInt Parses the string str-val into a integer. If the optional default-val is specified, it will be returned in the event of an exception.
(parse-int G__73133)
(parse-int G__73137 G__73138)
Inputs: ([str-val :- s/Str] [str-val default-val]) Returns: s/Int
( [str-val] [str-val :default default-val] ) A thin wrapper around js/parseInt Parses the string str-val into a integer. If the optional default-val is specified, it will be returned in the event of an Nan.
Inputs: ([str-val :- s/Str] [str-val default-val]) Returns: s/Int ( [str-val] [str-val :default default-val] ) A thin wrapper around js/parseInt Parses the string str-val into a integer. If the optional default-val is specified, it will be returned in the event of an Nan.
(parse-long str-val & opts)
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Long/parseLong. Parses the string str-val into a long. If the optional default-val is specified, it will be returned in the event of an exception.
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Long/parseLong. Parses the string str-val into a long. If the optional default-val is specified, it will be returned in the event of an exception.
(parse-short str-val & opts)
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Short/parseShort. Parses the string str-val into a short. If the optional default-val is specified, it will be returned in the event of an exception.
( [str-val] [str-val :default default-val] ) A thin wrapper around java.lang.Short/parseShort. Parses the string str-val into a short. If the optional default-val is specified, it will be returned in the event of an exception.
Nominal regex for signed/unsigned floating-point numbers (possibly in scientific notation)
Nominal regex for signed/unsigned floating-point numbers (possibly in scientific notation)
Nominal regex for signed/unsigned integers
Nominal regex for signed/unsigned integers
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close