[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-split
From: |
Martin Grabmueller |
Subject: |
Re: string-split |
Date: |
Wed, 12 Dec 2001 13:16:59 +0100 (MET) |
> From: Ron Peterson <address@hidden>
> Date: Tue, 11 Dec 2001 23:38:30 -0500 (EST)
>
> Does guile currently implement string-split? It's in the docs I recently
> obtained via CVS (nice work!), but I get an unbound variable error when I
> use it.
>
> Guile 1.3.4.
`string-split' is implemented in Guile starting with the beta versions
in the 1.5.x series, as well as in current CVS. You will need to
check for all features documented in the CVS manual whether they are
available in earlier versions of Guile or not.
If you need this procedure, try the following:
(define (string-split s ch)
(let ((index (string-index s ch)))
(if index
(cons (substring s 0 index)
(string-split (substring s (+ index 1) (string-length s)) ch))
(list s))))
HTH,
'martin
- string-split, Ron Peterson, 2001/12/11
- Re: string-split,
Martin Grabmueller <=