Function: ensure-trailing-slash

Source

(defun ensure-trailing-slash (url)
  (when (equal url "") (return-from ensure-trailing-slash "/"))
  (if (eql (char url (1- (length url))) #\/)
      url
      (strcat url "/")))
Source Context