[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-strip
From: |
Lars Hansen |
Subject: |
Re: string-strip |
Date: |
Mon, 19 Jun 2006 22:20:50 +0200 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20060423) |
Stuart D. Herring wrote:
>>1. Allow newlines in STR.
>>2. Treat newlines as white space.
>>
>>
>
>Shouldn't it really be up to the syntax table? Or is this supposed to be
>so much in Lisp land that the buffer shouldn't matter?
>
At least newlines should be allowed.
(my-string-strip " foo\n ") => (args-out-of-range " foo\n" 8 9)
(my-string-strip " foo\nbar ") => " "
is not acceptable IMO.
>>3. Return nil when resulting string is empty.
>>
>>
>
>Why do we want to do that?
>
To do something like
(defun (str)
(setq str (string-strip str))
(if str
;; handle string
...
;; no input
...
>"trailing", of course.
>
:-)
>"length", of course.
>
>
:-o
- string-strip, Andreas Roehler, 2006/06/17
- Re: string-strip, Richard Stallman, 2006/06/19
- Re: string-strip, Lars Hansen, 2006/06/19
- Re: string-strip, Richard Stallman, 2006/06/19
- Re: string-strip, Lars Hansen, 2006/06/20
- Re: string-strip, Richard Stallman, 2006/06/20
- Re: string-strip, Andreas Roehler, 2006/06/20
- Re: string-strip, Nick Roberts, 2006/06/20
- Re: string-strip, Kim F. Storm, 2006/06/20
- Re: string-strip, Nick Roberts, 2006/06/20
- Re: string-strip, Johan Bockgård, 2006/06/20