help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to check whether a character (or one-character string) is a letter?


From: Marcin Borkowski
Subject: How to check whether a character (or one-character string) is a letter?
Date: Sat, 04 Oct 2014 02:29:24 +0200

Hello,

this is a problem I have.

Assume that I have a character (taken from some string, which in turn is
copied from the buffer - so it need not be ASCII).  What is the best way
to check whether it is a letter within ASCII range?

The reason I'm asking is that I'm writing a function which converts an
arbitrary string to a valid (and nice) filename (e.g., only letters and
hyphens) - so basically I want to walk a string character by character
and convert any space to a hyphen and omit any other non-letter.  Am I
reinventing the wheel?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]