aset-byte

clojure.core

  • (aset-byte array idx val)
  • (aset-byte array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of byte. Returns val.

1 Example top

  • ;; create an array of 10 bytes and set one of the values to 127
    
    user=> (def bs (byte-array 10))
    #'user/bs
    user=> (vec bs)
    [0 0 0 0 0 0 0 0 0 0]
    user=> (aset-byte bs 2 127)
    127
    user=> (vec bs)
    [0 0 127 0 0 0 0 0 0 0]
    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.clj:3514 top

(def-aset
  ^{:doc "Sets the value at the index/indices. Works on arrays of byte. Returns val."
    :added "1.0"}
  aset-byte setByte byte)
Vars in clojure.core/aset-byte:
Used in 0 other vars

Comments top

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