lambda-blog.utils
Various useful utilities.
format-time
(format-time format timestamp)
Formats a timestamp
according to a given format
. timestamp
can be either a string, a JodaTime value, or a Java DateTime. format
can be either a string or a keyword recognized by clj-time.
get-version
(get-version)
Returns current lambda-blog version as specified in Maven pom.properties.
pathcat
(pathcat & parts)
Concatenates filesystem/URL paths parts
while maintaining correct format.
separate-with
(separate-with separator coll)
Creates a sequence of elements from coll
each separated with separator
.
substitute
(substitute string subs)
Substitutes occurances of {{key}}
in string
for matching :key
’s in subs
.
substitute-by
(substitute-by string f)
Substitutes occurances of {{key}}
in string
with (f key)
.