[Top][All Lists]

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

Re: How to see the value of each char in a string?

From: David Combs
Subject: Re: How to see the value of each char in a string?
Date: Fri, 29 Nov 2002 23:57:58 +0000 (UTC)

In article <>,
Oliver Scholz  <> wrote:
> (David Combs) writes:
>> , or, if fill-column happens to be 20:
>>  (146 157 157 061 
>>  ("f" "o" "o" "2" 
>> 063 146 157 157)
>> "3" "f" "o" "o")
>> Like, maybe running through the string twice, each
>> time saving the result, and while generating each one,
>> inserting three newlines every so often,
>Well, I think it is not possible (or at least very messy) to do this
>using the graphical representation of lists. What you wrote above
>would be the list
>(146 157 157 061 ("f" "o" "o" "2" 063 146 157 157) "3" "f" "o" "o")
>I must admit that I am not entirely sure that I understand what you
>want, despite your eplanation of your problem with `ls'. Maybe
>something like this?
>(require 'cl)
>(defun dc-display-ascii (string)
>  (interactive "sString: ")
>  (let ((standard-output (current-buffer)))
>    (pp (mapcar* 'cons
>                (mapcar 'string string)
>                (mapcar 'identity string)))))

Yes, thanks, does the trick.

>If you only want a convenient way to browse the ascii value of the
>chars in a string or buffer, you might want to have a look at the
>package ascii.el <URL:>.

Now, *that* is one neat little tool!

How does one find out that such tools exist?



reply via email to

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