Go strconv.ParseBool()

개요[ | ]

Go strconv.ParseBool()
package main

import (
	"fmt"
	"strconv"
)

func main() {
	v := "true"
	s, err := strconv.ParseBool(v)
	fmt.Println("err:", err)
	// err: <nil>
	fmt.Printf("s: (%T) %v\n", s, s)
	// s: (bool) true
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}