[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 <uisyixb0z.fsf@ID-87814.user.dfncis.de>,
Oliver Scholz <alkibiades@gmx.de> wrote:
>dkcombs@panix.com (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: http://www.cpqd.com.br/~vinicius/emacs/ascii.el.gz>.
Now, *that* is one neat little tool!
How does one find out that such tools exist?
Thanks!
David
- Re: How to see the value of each char in a string?, (continued)
- Re: How to see the value of each char in a string?, Kai Großjohann, 2002/11/26
- Re: How to see the value of each char in a string?, Barry Margolin, 2002/11/26
- Re: How to see the value of each char in a string?, David Combs, 2002/11/27
- Re: How to see the value of each char in a string?, Oliver Scholz, 2002/11/27
- Re: How to see the value of each char in a string?, David Combs, 2002/11/27
- Re: How to see the value of each char in a string?, Barry Margolin, 2002/11/27
- Re: How to see the value of each char in a string?, David Combs, 2002/11/29
- Re: How to see the value of each char in a string?, Barry Margolin, 2002/11/30
- Re: How to see the value of each char in a string?, Kai Großjohann, 2002/11/30
- Re: How to see the value of each char in a string?, Oliver Scholz, 2002/11/28
- Re: How to see the value of each char in a string?,
David Combs <=