Search code examples
goatoiparseint

int from string in go


What's the function to create a int value from string

i := ???.????( "10" )

Solution

  • Import the strconv package (src/pkg/strconv), then use strconv.Atoi("10")