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

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

Re: Constructing and Manipulating Raw Strings


From: Nordlöw
Subject: Re: Constructing and Manipulating Raw Strings
Date: Wed, 08 Dec 2010 15:31:45 -0000
User-agent: G2/1.0

On 13 Okt, 17:53, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Nordlöw <per.nord...@gmail.com> writes:
> > What is the best way to extract the individual bytes from hexadecimal
> > string (output from md5) and using them as input into a call to
> > unibyte-string()?
>
> > I want to use this raw string as a key in a hash table for file types
> > and then I don't want to waste space (size halves if we go from a
> > hexadecimal string to a raw byte string).
>
> > Does read() (or some of its variants) support reading raw unibyte
> > strings (that may contain zero bytes).
>
> You can use decode-hex-string instead:
>
> (decode-hex-string "4142434445464748494a4b4c4d4e4f")
> --> "ABCDEFGHIJKLMNO"
>
> --
> __Pascal Bourguignon__                    http://www.informatimago.com/

Thanks,
Per


reply via email to

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