From: Gavin Sinclair Date: 2003-02-17T09:02:16+09:00 Subject: Re: C-like cast from String to Integer needed. On Monday, February 17, 2003, 10:36:12 AM, Gavin wrote: > On Monday, February 17, 2003, 10:23:48 AM, Michael wrote: >> Hello, >> I read some data from, for example, Tcp. >> These data are read into a String. >> Somewhere in these String are 4 bytes, which are the binary >> representation of an Integer. > Does this help? > str = "100101" > Integer("0b" + str) # -> 37 Whoops. Looking at the other answers, I guess not. Gavin