git.haldean.org plotter / d9a3978
fix data cleaning issue with trailing space after Z stanza Haldean Brown 3 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
361361 )))))
362362
363363 (defun load-path-args (stz)
364 (when (> (length stz) 0)
365 (let ((stz-clean (string-trim '(#\Space #\Newline #\Tab #\Linefeed #\Return #\,) stz)))
364 (let ((stz-clean (string-trim '(#\Space #\Newline #\Tab #\Linefeed #\Return #\,) stz)))
365 (when (> (length stz-clean) 0)
366366 (multiple-value-bind (st end) (cl-ppcre:scan "[\\-]?[0-9]*(\\.[0-9]+|[0-9]*)" stz-clean)
367367 (cons (parse-float:parse-float (subseq stz-clean st end))
368368 (load-path-args (subseq stz-clean end)))))))