From 357e85cfb98576bf08b05c945b2a3864b33db19e Mon Sep 17 00:00:00 2001 From: Jaidyn Lev Date: Mon, 3 Dec 2018 01:33:00 -0600 Subject: [PATCH] Added get-colon-value --- src/package.lisp | 1 + src/string/string.lisp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/package.lisp b/src/package.lisp index 01555d8..edafc94 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -33,6 +33,7 @@ :getf-cadrs :get-colon-values + :get-colon-value :remove-colon-values :replace-colon-value diff --git a/src/string/string.lisp b/src/string/string.lisp index 42f95c6..78fcfd8 100644 --- a/src/string/string.lisp +++ b/src/string/string.lisp @@ -365,6 +365,12 @@ Example: (get-colon-values (line-cdr colon-lines)))))))) +;; STRING COLON_VARIABLE_NAME --> COLON_VALUE +(defun get-colon-value (string variable) + "Return a value of a `colon variable`." + + (getf (get-colon-values string) (read-from-string variable))) + ;; STRING COLON_VARIABLE_NAME --> STRING_WITHOUT_COLON_VARIABLE (defun remove-colon-values (string)