1.3.0 permalink Arrow_down_16x16

char-array

clojure.core

  • (char-array size-or-seq)
  • (char-array size init-val-or-seq)
Creates an array of chars

1 Example top

  • user> (char-array "asdf")
    #<char[] [C@167fc18>
    
    user> (seq (char-array "asdf"))
    (\a \s \d \f)
    
    user> (seq (char-array 10))
    (\^@ \^@ \^@ \^@ \^@ \^@ \^@ \^@ \^@ \^@)
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:4618 top

(defn char-array
  "Creates an array of chars"
  {:inline (fn [& args] `(. clojure.lang.Numbers char_array ~@args))
   :inline-arities #{1 2}
   :added "1.1"}
  ([size-or-seq] (. clojure.lang.Numbers char_array size-or-seq))
  ([size init-val-or-seq] (. clojure.lang.Numbers char_array size init-val-or-seq)))
Vars in clojure.core/char-array:
Used in 0 other vars

Comments top

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