Discussion:
String to uint32
Joan Miller
2010-04-08 12:57:24 UTC
Permalink
How to convert a string to uint32?

The library `strconv` has not a function to convert to uint32
else to uint64 and uint
--
To unsubscribe, reply using "remove me" as the subject.
Lambda
2010-04-08 13:04:39 UTC
Permalink
func Atoui(s string) (i uint, err os.Error)
func Atoui64(s string) (n uint64, err os.Error)

There is no Atoui32, maybe for some reasons.
Post by Joan Miller
How to convert a string to uint32?
The library `strconv` has not a function to convert to uint32
else to uint64 and uint
--
To unsubscribe, reply using "remove me" as the subject.
peterGo
2010-04-08 13:23:21 UTC
Permalink
Joan,

Read the replies to your messages form yesterday. You would see:

if bar, err := strconv.Atoui(t[1]); err == nil {
f.bar = uint32(bar)
}

Peter
Post by Joan Miller
How to convert a string to uint32?
The library `strconv` has not a function to convert to uint32
else to uint64 and uint
--
To unsubscribe, reply using "remove me" as the subject.
Loading...