Added get-colon-value

This commit is contained in:
Jaidyn Lev 2018-12-03 01:33:00 -06:00
parent 3236f7676e
commit 357e85cfb9
2 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,7 @@
:getf-cadrs :getf-cadrs
:get-colon-values :get-colon-values
:get-colon-value
:remove-colon-values :remove-colon-values
:replace-colon-value :replace-colon-value

View File

@ -365,6 +365,12 @@ Example:
(get-colon-values (line-cdr colon-lines)))))))) (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 ;; STRING COLON_VARIABLE_NAME --> STRING_WITHOUT_COLON_VARIABLE
(defun remove-colon-values (string) (defun remove-colon-values (string)