Browse code

Added get-colon-value

Jaidyn Lev authored on 2018-12-03 07:33:00
Showing 2 changed files
... ...
@@ -33,6 +33,7 @@
33 33
     :getf-cadrs
34 34
 
35 35
     :get-colon-values
36
+    :get-colon-value
36 37
     :remove-colon-values
37 38
     :replace-colon-value
38 39
 
... ...
@@ -365,6 +365,12 @@ Example:
365 365
 		      (get-colon-values (line-cdr colon-lines))))))))
366 366
 
367 367
 
368
+;; STRING COLON_VARIABLE_NAME --> COLON_VALUE
369
+(defun get-colon-value (string variable)
370
+  "Return a value of a `colon variable`."
371
+
372
+  (getf (get-colon-values string) (read-from-string variable)))
373
+
368 374
 
369 375
 ;; STRING COLON_VARIABLE_NAME --> STRING_WITHOUT_COLON_VARIABLE
370 376
 (defun remove-colon-values (string)