Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 71f11c368e
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 39 lines (33 sloc) 1.404 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
;; parameters.lisp -- Parameter list
;;
;; Copyrigth (C) 2012 David Vázquez
;;
;; This file is part of cl-icalendar.
;;
;; cl-icalendar is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; cl-icalendar is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with cl-icalendar. If not, see <http://www.gnu.org/licenses/>.

(in-package :cl-icalendar)

;;; A parameter list is a list of the form
;;;
;;; (PARAM-NAME1 PARAM-VALUE1 PARAM-NAME2 PARAM-NAME2 ...)
;;;
;;; PARAM-NAMEs are upcased strings. PARAM-VALUEs are strings or list
;;; of strings.

;;; Get the value of the parameter, whose name is given in the string
;;; designator PARAMETER, in the given PARAMETER-LIST.
(defun parameter (parameter parameter-list)
  (let ((name (string parameter)))
    (loop for (param value) on parameter-list by #'cddr
          when (string= name param) return value)))

#| See content-line.lisp about parameters reading and writing |#

;; parameters.lisp ends here
Something went wrong with that request. Please try again.