summaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-04 21:44:52 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-04 23:30:51 +0200
commit6568d2bd6e4e047dd95b00a7a6e7501a16491eb5 (patch)
treef5f16ed73cbb0486fd00a8147707ce75b2132df4 /guix/utils.scm
parente89431bf016830a919ec2430889f6c2679aab408 (diff)
search-paths: Add 'evaluate-search-paths', from (guix scripts package).
* guix/scripts/package.scm (with-null-error-port, evaluate-search-paths): Move to... * guix/search-paths.scm: ... here. * guix/utils.scm (string-tokenize*): Move to... * guix/search-paths.scm: ... here. * tests/utils.scm ("string-tokenize*"): Adjust accordingly.
Diffstat (limited to 'guix/utils.scm')
-rw-r--r--guix/utils.scm28
1 files changed, 0 insertions, 28 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 3d38ba1223..a2ade2bf97 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -72,7 +72,6 @@
version-major+minor
guile-version>?
package-name->name+version
- string-tokenize*
string-replace-substring
arguments-from-environment-variable
file-extension
@@ -606,33 +605,6 @@ introduce the version part."
(substring file 0 dot)
file)))
-(define (string-tokenize* string separator)
- "Return the list of substrings of STRING separated by SEPARATOR. This is
-like `string-tokenize', but SEPARATOR is a string."
- (define (index string what)
- (let loop ((string string)
- (offset 0))
- (cond ((string-null? string)
- #f)
- ((string-prefix? what string)
- offset)
- (else
- (loop (string-drop string 1) (+ 1 offset))))))
-
- (define len
- (string-length separator))
-
- (let loop ((string string)
- (result '()))
- (cond ((index string separator)
- =>
- (lambda (offset)
- (loop (string-drop string (+ offset len))
- (cons (substring string 0 offset)
- result))))
- (else
- (reverse (cons string result))))))
-
(define* (string-replace-substring str substr replacement
#:optional
(start 0)