Go Package strconv: Difference between revisions
Jump to navigation
Jump to search
(→Itoa()) |
|||
Line 23: | Line 23: | ||
{{External|https://pkg.go.dev/strconv#Itoa}} | {{External|https://pkg.go.dev/strconv#Itoa}} | ||
Converts an integer to its string representation. | Converts an integer to its string representation. | ||
====<tt>FormatFloat()</tt>==== | |||
{{External|https://pkg.go.dev/strconv#FormatFloat}} | |||
====<tt>ParseFloat()</tt>==== | |||
{{External|https://pkg.go.dev/strconv#ParseFloat}} |
Latest revision as of 04:41, 22 August 2023
External
Internal
Overview
The strconv
package contains functions to convert strings to and from other data types.
Functions
Atoi()
ASCII-to-int, converts a string representation of an integer to an int
type.
import "strconv"
a := "15"
b, error := strconv.Atoi(a)
println(b, error)
Itoa()
Converts an integer to its string representation.