Changeset 4 for trunk/csv.lisp
- Timestamp:
- 02/09/2008 09:24:02 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/csv.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/csv.lisp
r2 r4 1 1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*- 2 3 #| 4 Copyright (C) 2007, 2008 David Owen <dsowen@fugue88.ws> 5 6 This program is free software: you can redistribute it and/or modify 7 it under the terms of the GNU Lesser Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU Lesser Public License for more details. 15 16 You should have received a copy of the GNU Lesser Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 |# 2 19 3 20 (defpackage #:dso-csv … … 14 31 15 32 16 (flet ((trim (s) ( substring s :start 1 :length (- (length s) 2))))33 (flet ((trim (s) (dso-parse::substring s :start 1 :length (- (length s) 2)))) 17 34 (defun un-squote (s) 18 35 (cl-ppcre:regex-replace-all "''" (trim s) "'")) … … 59 76 (file (+ row)) 60 77 (row (t-value (* row-rest) (= t-newline)) 61 (lambda (row) (cons (caar row) (mapcar #'second (second row)))))62 (row-rest ((= t-comma) t-value) car))78 :filter (lambda (row) (cons (caar row) (mapcar #'second (second row))))) 79 (row-rest ((= t-comma) t-value) :filter car)) 63 80 64 81
Note: See TracChangeset
for help on using the changeset viewer.
