1.3.0 permalink Arrow_down_16x16

aset-char

clojure.core

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

1 Example top

  • ;; create an array of 10 characters (initially set to blank by default)
    ;; and set one of the elements to the character "a"
    
    user=> (def cs (char-array 10))
    #'user/cs
    user=> (vec cs)
    [\  \  \  \  \  \  \  \  \  \ ]
    user=> (aset-char cs 3 \a)
    \a
    user=> (vec cs)
    [\  \  \  \a \  \  \  \  \  \ ]
    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:3519 top

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

Comments top

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