Liking cljdoc? Tell your friends :D

tupelo.parse

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.
raw docstring

edn-parsibleclj/s

(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`. 
sourceraw docstring

parse-byteclj

(parse-byte str-val & opts)
 (parse-byte str-val )
 (parse-byte 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-byte str-val )
     (parse-byte 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.
sourceraw docstring

parse-decimalclj

(parse-decimal str-val)
(parse-decimal opts str-val)

Inputs: ([str-val :- s/Str] [opts :- tsk/KeyMap str-val :- s/Str])

A thin wrapper around java.math/BigDecimal(String value). Parses the string str-val into a BigDecimal. An optional default value may be specified in the opts map; is present, it will be returned in the event of an exception.

Inputs: ([str-val :- s/Str] [opts :- tsk/KeyMap str-val :- s/Str])

A thin wrapper around java.math/BigDecimal(String value).  Parses the string str-val into a BigDecimal.
      An optional default value may be specified in the opts map; is present, it will be returned in the event of an exception. 
sourceraw docstring

parse-doubleclj

(parse-double str-val & opts)
 (parse-double str-val
 (parse-double 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-double str-val
     (parse-double 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.
sourceraw docstring

parse-floatclj/s≠

clj
(parse-float str-val & opts)
 (parse-float str-val
 (parse-float 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 str-val
     (parse-float 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.
cljs
(parse-float G__81479)
(parse-float G__81483 G__81484)

Inputs: ([str-val :- s/Str] [str-val default-val]) Returns: s/Num

       (parse-float str-val)
       (parse-float 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


           (parse-float str-val)
           (parse-float 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.
source (clj)source (cljs)raw docstring

parse-intclj/s≠

clj
(parse-int str-val & opts)
 (parse-int str-val)
 (parse-int 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 str-val)
     (parse-int 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.
cljs
(parse-int G__81466)
(parse-int G__81470 G__81471)

Inputs: ([str-val :- s/Str] [str-val default-val]) Returns: s/Int

       (parse-int str-val)
       (parse-int 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


           (parse-int str-val)
           (parse-int 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.
source (clj)source (cljs)raw docstring

parse-longclj

(parse-long str-val & opts)
 (parse-long str-val)
 (parse-long 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-long str-val)
     (parse-long 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.
sourceraw docstring

parse-shortclj

(parse-short str-val & opts)
 (parse-short str-val)
 (parse-short 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.

     (parse-short str-val)
     (parse-short 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.
sourceraw docstring

regex-floatcljs

Nominal regex for signed/unsigned floating-point numbers (possibly in scientific notation)

Nominal regex for signed/unsigned floating-point numbers (possibly in scientific notation)
sourceraw docstring

regex-intcljs

Nominal regex for signed/unsigned integers

Nominal regex for signed/unsigned integers
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close