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

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

Converting strings of hexadecimal numbers to the respective bytes


From: florian
Subject: Converting strings of hexadecimal numbers to the respective bytes
Date: Mon, 6 Apr 2009 15:22:02 -0700 (PDT)
User-agent: G2/1.0

I was wondering if it is possible to convert a string, say '0a', which
represents a two-digit hexadecimal number, to the corresponding byte.
The solution does not seem far away (something like char-to-string),
but surprisingly, Elisp does not seem to deal much with hexadecimal
numbers.

What I mean is: if it were a three-digit decimal representation, you
could say

   (char-to-string (string-to-number "010"))

instead, but I don't seem to see such a possibility for a hexadecimal
number.

The question may be very dumb, but could Elisp do such a thing at all?

Thanks for any enlightenment ...

Florian


reply via email to

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