Hi,
I am looking for the best way to convert a string of length 1 (= 1
character as string) to integer that has the same value as numeric
representation of that character. Background: I am writing functions
abstracting endianness, e.g. converting a string of length 4 to the
appropriate integer
On Sat, 15 Sep 2007 11:55:28 +, Boris Dušek wrote:
I am looking for the best way to convert a string of length 1 (= 1
character as string) to integer that has the same value as numeric
representation of that character. Background: I am writing functions
abstracting endianness, e.g.
On Sep 15, 1:59 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
So you are looking for the `struct` module in the standard library instead
of doing this yourself. :-)
If you insist on doing it yourself take a look at the built-in `ord()`
function.
Thanks Marc,
both things are
On Sep 15, 9:55 pm, Boris Dušek [EMAIL PROTECTED] wrote:
Hi,
I am looking for the best way to convert a string of length 1 (= 1
character as string) to integer that has the same value as numeric
representation of that character. Background: I am writing functions
abstracting endianness, e.g.