[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string func to use in .emacs
From: |
Eli Zaretskii |
Subject: |
Re: string func to use in .emacs |
Date: |
Sun, 25 Jan 2004 19:59:42 +0200 |
> From: Peter Wu <peterwu@hotmail.com>
> Newsgroups: gnu.emacs.help
> Date: Sun, 25 Jan 2004 09:21:07 -0500
>
> What I am looking for is like this:
>
> input := "Emacs "
> output := "Emacs"
>
> The trailing blank space is trimmed.
Try this:
(let ((i (string-match " +\\'" input)))
(when i
(setq output (substring input 0 i))))
(You may wish to replace `output' with `input', so that it is
destructively trimmed.)
- string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Eli Zaretskii, 2004/01/25
- Message not available
- Re: string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Mario Domgörgen, 2004/01/25
- Re: string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Jesper Harder, 2004/01/25
- Re: string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Jesper Harder, 2004/01/25
- Re: string func to use in .emacs, Peter Wu, 2004/01/26
- Re: string func to use in .emacs, Eli Zaretskii, 2004/01/26
- Re: string func to use in .emacs,
Eli Zaretskii <=