[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with (string-tokenize string charset)
From: |
Thien-Thi Nguyen |
Subject: |
Re: problem with (string-tokenize string charset) |
Date: |
Tue, 03 Dec 2002 00:22:40 -0800 |
From: Stan Pinte <address@hidden>
Date: Tue, 3 Dec 2002 09:24:20 +0100
guile> (string-tokenize "stan-henry" (char-set #\-))
("-")
--> as documented, this should return ("stan" "henry").
perhaps you aren't seeing this documentation:
- Scheme Procedure: string-tokenize s token_set start end
Split the string S into a list of substrings, where each substring
is a maximal non-empty contiguous sequence of characters from the
character set TOKEN_SET, which defaults to `char-set:graphic' from
module (srfi srfi-14). If START or END indices are provided, they
restrict `string-tokenize' to operating on the indicated substring
of S.
the token set defines the charset of the tokens, rather than of the
delimiter; you need to invert it to get the desired behavior. e.g.:
guile-tools --source split-string-no-nulls | fgrep -A5 '. sep'
thi