* test char
@ 2008-11-29 5:00 Xend
2008-11-29 6:24 ` Andreas Politz
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Xend @ 2008-11-29 5:00 UTC (permalink / raw)
To: help-gnu-emacs
are there Emacs function like Libc function isupper / isalpha???
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: test char
2008-11-29 5:00 test char Xend
@ 2008-11-29 6:24 ` Andreas Politz
2008-11-29 10:14 ` Eli Zaretskii
[not found] ` <mailman.1477.1227953655.26697.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Andreas Politz @ 2008-11-29 6:24 UTC (permalink / raw)
To: help-gnu-emacs
Xend wrote:
> are there Emacs function like Libc function isupper / isalpha???
I dont think so.
(defun isupper (char)
(string-match "[[:upper:]]" (make-string 1 char)))
(isupper ?a)
-ap
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: test char
2008-11-29 5:00 test char Xend
2008-11-29 6:24 ` Andreas Politz
@ 2008-11-29 10:14 ` Eli Zaretskii
[not found] ` <mailman.1477.1227953655.26697.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2008-11-29 10:14 UTC (permalink / raw)
To: help-gnu-emacs
> From: Xend <firperfect@gmail.com>
> Date: Fri, 28 Nov 2008 21:00:03 -0800 (PST)
>
> are there Emacs function like Libc function isupper / isalpha???
It's all too easy to make one:
(eq (downcase ch) ch)
Btw, why do you need such a function? What do you need to do if these
functions return t? Perhaps you could do whatever you need without
such a test?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: test char
[not found] ` <mailman.1477.1227953655.26697.help-gnu-emacs@gnu.org>
@ 2008-11-29 11:01 ` Andreas Politz
2008-11-29 12:37 ` Juanma Barranquero
[not found] ` <mailman.1481.1227962264.26697.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Politz @ 2008-11-29 11:01 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii wrote:
>> From: Xend <firperfect@gmail.com>
>> Date: Fri, 28 Nov 2008 21:00:03 -0800 (PST)
>>
>> are there Emacs function like Libc function isupper / isalpha???
>
> It's all too easy to make one:
>
> (eq (downcase ch) ch)
That's unimaginary more elegant than what I suggested. :-)
-ap
>
> Btw, why do you need such a function? What do you need to do if these
> functions return t? Perhaps you could do whatever you need without
> such a test?
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: test char
2008-11-29 11:01 ` Andreas Politz
@ 2008-11-29 12:37 ` Juanma Barranquero
[not found] ` <mailman.1481.1227962264.26697.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Juanma Barranquero @ 2008-11-29 12:37 UTC (permalink / raw)
To: Andreas Politz; +Cc: help-gnu-emacs
On Sat, Nov 29, 2008 at 12:01, Andreas Politz <politza@fh-trier.de> wrote:
> That's unimaginary more elegant than what I suggested. :-)
Yours would have to be more like
(defun isupper (char)
(let (case-fold-search)
(string-match-p "[[:upper:]]" (make-string 1 char))))
but has the advantadge that
ELISP> (isupper ??)
nil
ELISP> (eq (upcase ??) ??)
t
Juanma
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: test char
[not found] ` <mailman.1481.1227962264.26697.help-gnu-emacs@gnu.org>
@ 2008-12-05 10:48 ` Xend
0 siblings, 0 replies; 6+ messages in thread
From: Xend @ 2008-12-05 10:48 UTC (permalink / raw)
To: help-gnu-emacs
On Nov 29, 8:37 pm, "Juanma Barranquero" <lek...@gmail.com> wrote:
> On Sat, Nov 29, 2008 at 12:01, Andreas Politz <poli...@fh-trier.de> wrote:
> > That's unimaginary more elegant than what I suggested. :-)
>
> Yours would have to be more like
>
> (defun isupper (char)
> (let (case-fold-search)
> (string-match-p "[[:upper:]]" (make-string 1 char))))
>
> but has the advantadge that
>
> ELISP> (isupper ??)
> nil
> ELISP> (eq (upcase ??) ??)
> t
>
> Juanma
thanks boy , i can get it
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-05 10:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-29 5:00 test char Xend
2008-11-29 6:24 ` Andreas Politz
2008-11-29 10:14 ` Eli Zaretskii
[not found] ` <mailman.1477.1227953655.26697.help-gnu-emacs@gnu.org>
2008-11-29 11:01 ` Andreas Politz
2008-11-29 12:37 ` Juanma Barranquero
[not found] ` <mailman.1481.1227962264.26697.help-gnu-emacs@gnu.org>
2008-12-05 10:48 ` Xend
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.