When i call the .split
methode in clojure i get: #object["[Ljava.lang.String;" 0x5aaf6982 "[Ljava.lang.String;@5aaf6982"] #object["[Ljava.lang.String;" 0x18fbbda2 "[Ljava.lang.String;@18fbbda2"]
.
How can i use this object in my code?
You can use vec
to convert a Java array into a vector, e.g.
(vec (.split "1,2,3,4,5" ","))
=> ["1" "2" "3" "4" "5"]
But really if you want to split a string into a Clojure collection you should be using clojure.string/split
instead:
(clojure.string/split "1,2,3,4,5" #",")
=> ["1" "2" "3" "4" "5"]