我知道如何用空格分隔字符串序列:
(defun ff-cols (dir file)
(with-open-file (ff-cols-str pathname :direction :input)
(length (split-sequence #\Space (read-line ff-cols-str nil 'eof)))))
但是如何用双空格分隔序列?平面文件通常具有由双空格分隔的列。
(split-sequence " " "1 2 3 4")
返回
("1 2 3 4") ;
10
还,
(split-sequence #\Space "1 2 3 4")
返回
("1" "" "2" "" "3" "" "4") ;
10