[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rationale for split-string?
From: |
Luc Teirlinck |
Subject: |
Re: Rationale for split-string? |
Date: |
Tue, 22 Apr 2003 11:26:18 -0500 (CDT) |
Stephen Turnbull wrote:
Note that Miles's proposal would actually give the behavior you want
in `(split-string string "\n")'. (Admittedly, you'd like
`(split-string string "\n" 'end)' even better.) Point for Miles!
Just to make sure I understand what you are proposing:
I could not just do (split-string string "\n"), I would first have to
check whether the string ended in a newline and, if so, remove that
newline before calling split-string (or do something else). Otherwise
split-string would return a "fake" empty line at the end of a newline
terminated buffer or file. (Correct?) Or are you actually suggesting
to remove a final empty match, but keep any initial empty match,
exactly the behavior I suggested for "end".
That is, would (split-string "\n" "\n") return ("" "") or ("") ?
Sincerely,
Luc.
- Re: Rationale for split-string?, (continued)
- Re: Rationale for split-string?, Luc Teirlinck, 2003/04/22
- Re: Rationale for split-string?, Jerry James, 2003/04/22
- Re: Rationale for split-string?, Luc Teirlinck, 2003/04/22
- Re: Rationale for split-string?, Stephen J. Turnbull, 2003/04/22
- Re: Rationale for split-string?, Miles Bader, 2003/04/22
- Re: Rationale for split-string?, Luc Teirlinck, 2003/04/22
- Re: Rationale for split-string?,
Luc Teirlinck <=
- Re: Rationale for split-string?, Richard Stallman, 2003/04/22
- Re: Rationale for split-string?, Stephen J. Turnbull, 2003/04/23
- Re: Rationale for split-string?, Richard Stallman, 2003/04/24