Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import(
- "fmt"
- "strconv"
- )
- //converts string to integer
- func StrtoInt(input string) int {
- i, _ := strconv.Atoi(input)
- return i
- }
- func main() {
- fmt.Println(StrtoInt("3"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement