Quantcast
Channel: How to convert a clojure keyword into a string? - Stack Overflow
Browsing all 6 articles
Browse latest View live

Answer by Satyam Ramawat for How to convert a clojure keyword into a string?

It's not a tedious task to convert any data type into a string, Here is an example by using str.(defn ConvertVectorToString [] (let [vector [1 2 3 4]] (def toString (str vector))) (println toString)...

View Article


Answer by matt whatever for How to convert a clojure keyword into a string?

This will also give you a string from a keyword:(str (name :baz)) -> "baz"(str (name ::baz)) -> "baz"

View Article


Answer by txmikester for How to convert a clojure keyword into a string?

Actually, it's just as easy to get the namespace portion of a keyword:(name :foo/bar) => "bar"(namespace :foo/bar) => "foo"Note that namespaces with multiple segments are separated with a '.',...

View Article

Answer by Rafael Munitić for How to convert a clojure keyword into a string?

Note that kotarak's answer won't return the namespace part of keyword, just the name part - so : (name :foo/bar)>"bar"Using his other comment gives what you asked for :(subs (str :foo/bar)...

View Article

Answer by kotarak for How to convert a clojure keyword into a string?

user=> (doc name)-------------------------clojure.core/name([x]) Returns the name String of a string, symbol or keyword.niluser=> (name :var_name)"var_name"

View Article


How to convert a clojure keyword into a string?

In my application I need to convert clojure keyword eg. :var_name into a string "var_name". Any ideas how that could be done?

View Article
Browsing all 6 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>