Strings¶
pr-str¶
Prints a variable number of values into a string, separated by whitespace. Each collection type follows its own printing rule. In addition, strings are escaped.
1 2 3 4 5 6 7 8 9 10 11 |
|
""hello" "world""
"[1 2 3 4]"
"[1 2 3 4]"
"(1 2 3 4)"
"{"key" "value"}"
"{"key" "value"}"
"{:key1 [1 2 3]} {:key2 (1 2 3 4)}"
slurp¶
Reads the content of a file into a string. The path can be absolute or relative to the script.
(slurp "file.txt")
str¶
Prints a variable number of values into a string, without whitespace separation. Each collection type follows its own printing rule.
1 2 3 4 5 6 7 8 9 10 11 |
|
"helloworld"
"[1 2 3 4]"
"[1 2 3 4]"
"(1 2 3 4)"
"{"key" value}"
"{"key" value}"
"{:key1 [1 2 3]}{:key2 (1 2 3 4)}"