diff options
author | Arun Isaac | 2021-09-14 13:34:39 +0530 |
---|---|---|
committer | Arun Isaac | 2021-09-14 13:39:46 +0530 |
commit | 573f49eb873651f1fecfda352007da8429e2bc8a (patch) | |
tree | 68a36a7350fcb5e164ec35f7ed2d8ce98f2c0807 | |
parent | 2dd92a874655087181123276f9d3d02003a7bb94 (diff) | |
download | gn-transform-databases-573f49eb873651f1fecfda352007da8429e2bc8a.tar.gz |
Abstract out deleting substrings.
* dump.scm (delete-substrings): New function.
(dump-publication): Replace string-replace-substring with
delete-substrings.
-rwxr-xr-x | dump.scm | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -75,6 +75,11 @@ ;;; Dump tables +(define (delete-substrings str . substrings) + (fold (lambda (substring result) + (string-replace-substring result substring "")) + str + substrings)) (define (snake->lower-camel str) (let ((char-list (string->list str))) @@ -244,7 +249,7 @@ Lab_code, Submitter, Owner, Authorized_Users FROM Phenotype")) ;; TODO: Handle unprintable ;; characters better. (list (cons 'gn:abstract - (string-replace-substring abstract "\x01" "")))) + (delete-substrings abstract "\x01")))) (x (list x))) (process-metadata-alist alist)) id))) |