Menu Close

Go – strconv package in go

In this tutorial, We are going to learn about strconv package in go. It is used to implements conversions to and from string representations of basic data types.

There are two types of conversions in strconv package in go:

  • Numeric conversions
  • String conversions

Numeric conversions
—–

There are two very common numeric conversions:

  • Atoi() : string to int
  • Itoa() : int to string

String Conversions 
—–

There are two very common string conversions:

  • Quote(): convert strings to quoted Go string literals
  • QuoteToASCII(): convert strings to quoted Go string literals

This package has rich set of functions:

To learn more about golang, Please refer given below link.

https://www.techieindoor.com/go-lang-tutorial/
https://www.techieindoor.com/go-lang-tutorial/

References:

 https://golang.org/doc/
 https://golang.org/pkg/
Posted in golang, packages, strconv

Leave a Reply

Your email address will not be published.

Contact Us