all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Constructing and Manipulating Raw Strings
Date: Wed, 13 Oct 2010 10:23:13 -0700 (PDT)	[thread overview]
Message-ID: <96cbb2a1-d922-4952-a964-eac6ec0f73d6@s19g2000vbr.googlegroups.com> (raw)
In-Reply-To: 87tykqhyx7.fsf@kuiper.lan.informatimago.com

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	other threads:[~2010-10-13 17:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 12:13 Constructing and Manipulating Raw Strings Nordlöw
2010-10-13 15:53 ` Pascal J. Bourguignon
2010-10-13 17:23   ` Nordlöw [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96cbb2a1-d922-4952-a964-eac6ec0f73d6@s19g2000vbr.googlegroups.com \
    --to=per.nordlow@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.