You're viewing version 1.2.0 of byte. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (byte x)
Coerce to byte

1 Example top

  • user=> (def x (byte-array [(byte 0x43) 
                               (byte 0x6c)
                               (byte 0x6f)
                               (byte 0x6a)
                               (byte 0x75)
                               (byte 0x72)
                               (byte 0x65)
                               (byte 0x21)]))
    user=> (String. x)
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:2697 top

(defn byte
  "Coerce to byte"
  {:tag Byte
   :inline (fn  [x] `(. clojure.lang.RT (byteCast ~x)))
   :added "1.0"}
  [^Number x] (clojure.lang.RT/byteCast x))
Vars in clojure.core/byte: defn
Used in 1 other vars aset-byte

Comments top

No comments for byte. Log in to add a comment.