From 8fba7071223fb6744407789c1b1ae5a4549779e5 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 12 Mar 2022 14:17:17 -0600 Subject: built and ran refactored client app --- lib/util.lisp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/util.lisp') diff --git a/lib/util.lisp b/lib/util.lisp index 2a6d456..27f389e 100644 --- a/lib/util.lisp +++ b/lib/util.lisp @@ -46,6 +46,14 @@ the directories that appear in the value of that variable." thereis (uiop:file-exists-p (make-pathname :name name :directory directory)))) +(defun parse-oneliner-tags (string) + "Splits a string using consequtive whitespace as a separator, and +returns a set of strings that name executable system commands, as +determined by EXECUTABLE-ON-SYSTEM-P." + (remove-duplicates + (remove-if-not #'executable-on-system-p (ppcre:split " +" string)) + :test #'equal)) + (defun print-to-file (printable-object pathname &optional (if-exists :supersede)) "Prints an object to a file, ensuring that the containing directory exists first." (ensure-directories-exist pathname) @@ -61,3 +69,4 @@ the directories that appear in the value of that variable." (defun true-or-false (what) "Returns the strings \"true\" or \"false\" depending on whehter or not WHAT is null" (if what "true" "false")) + -- cgit v1.2.3