(ns github-changelog.util
  (:require [clojure.string :refer [ends-with?]]))

(defn str-map [f & sqs] (apply str (apply map f sqs)))

(defn extract-params [query-string]
  (into {} (for [[_ k v] (re-seq #"([^&=]+)=([^&]+)" query-string)]
             [(keyword k) v])))

(defn strip-trailing
  ([s] (strip-trailing s "/"))
  ([s end]
   (if (ends-with? s end)
     (recur (apply str (drop-last s)) end)
     s)))

(ns github-changelog.util
  (:require [clojure.string :refer [join ends-with?]]))

(defn str-map [f & sqs] (join (apply map f sqs)))

(defn extract-params [query-string]
  (into {} (for [[_ k v] (re-seq #"([^&=]+)=([^&]+)" query-string)]
             [(keyword k) v])))

(defn strip-trailing
  ([s] (strip-trailing s "/"))
  ([s end]
   (if (ends-with? s end)
     (recur (join (drop-last s)) end)
     s)))

Revert "Use apply str instead of join"
Revert "Use apply str instead of join"

This reverts commit 25517ae46d3f370137f1bcc871d646f8a02c743c.

whitepages/github-changelog