|
Re: string conversion, format functions: msg#00339lang.erlang.general
Strange, but they are in erlang, not strings: list_to_integer/1 integer_to_list/1 since a string is a list, they work quite well. :) HP Wei <hp@xxxxxxxxxx> wrote: > I have a string "123" and want to convert it to an integer > or float, and vice versa. > > In python, I go to the string module and > there are string.atoi(), string.atof(), and str(number). > So, by habit, I went to string module doc in Erlang > I could not find the counterparts of these functions. Where are they ? > > ------------------------- > B = 3. > > I want to form a string "0003". > ** Can io:format generate such a printout ? > ** Can it be redirected to a string ? > ** If not, how do folks in Erlang world do this padding? > > thanks, > hp > -- Shawn. /* * [...] Note that 120 sec is defined in the protocol as the maximum * possible RTT. I guess we'll have to use something other than TCP * to talk to the University of Mars. * PAWS allows us longer timeouts and large windows, so once implemented * ftp to mars will work nicely. */ -- from /usr/src/linux/net/inet/tcp.c, concerning RTT [round trip time] |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: string conversion, format functions: 00339, Matthias Lang |
|---|---|
| Next by Date: | Re: catching errors from linked processes (Long): 00339, Chris Pressey |
| Previous by Thread: | Re: string conversion, format functionsi: 00339, Chris Pressey |
| Next by Thread: | Re: string conversion, format functions: 00339, Jay Nelson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |