L
L
LittleBuster2015-05-25 10:59:56
go
LittleBuster, 2015-05-25 10:59:56

uint8, 16, 32 int8, 16, 32 to string and vice versa Go?

Nowhere can I find information on converting these types to a string and vice versa. Found only for uint64 int64 in strconv

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Volegov, 2015-05-25
@LittleBuster

A simple cast to type does not work?
play.golang.org/p/5lk3_iv-kR

U
uvelichitel, 2015-05-25
@uvelichitel

There is an easy way to convert anything to a string fmt.Sprint() back fmt.Sscan(). All the machinery is hidden behind the stage, but it's quite heavy back there. playground

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question