1-youmaywriteyourconversionfunction (快速) :
funcstring(nint32 ) string ) buf:=[11]byte ) pos:=len ) buf ) I3:=int64 ) n ) signed 3360=I0ifsigned I
See inside:
//sprintformatsusingthedefaultformatsforitsoperandsandreturnstheresultingstring.//spacesareaddedbetweenoperandswhenneitherisastring.func sprint (a .接口) ) string ) p :=new打印机) ) p.do prprp ee ) ) returns )3-youmayusestrconv.itoa(int ) I ) (Fast ) ) ) ) )。
See inside:
//itoaisshorthandforformatint (int64(I,10 ).funcitoa(Iint ) string{returnformatint ) int 64 (I,10 ) }4-yymat
See inside:
//formatintreturnsthestringrepresentationofinthegivenbase,//for2=base=36.theresultusesthelower-case letters ' a s:=formatbits(nil,uint64(I ),base,i 0,false ) return s} )或更高版本为https://堆栈覆盖.com/questions/394421666
本人的自助代码:
functest_conver(t*testing.t ) varstairnamestrings :=' test 886400 ' id :=int 32 ) 886400 ) idstr 3360=str riname