Golang unicode.IsPunct() function example
package unicode
Golang unicode.IsPunct() function usage example.
package main
import (
"fmt"
"unicode"
)
func main() {
punctuation := unicode.IsPunct('A')
fmt.Println("A is a punctuation ? : ", punctuation)
punctuation = unicode.IsPunct('.')
fmt.Println(". is a punctuation ? : ", punctuation)
}
Output :
A is a punctuation ? : false
. is a punctuation ? : true
References :
Advertisement
Something interesting
Tutorials
+7.1k Golang : Gorrila mux.Vars() function example
+10.4k Golang : Meaning of omitempty in struct's field tag
+15.4k Golang : invalid character ',' looking for beginning of value
+23.5k Golang : Check if element exist in map
+6k Golang : Convert Chinese UTF8 characters to Pin Yin
+11k How to test Facebook App on localhost ?
+22.7k Golang : Strings to lowercase and uppercase example
+12.3k Golang : Flush and close file created by os.Create and bufio.NewWriter example
+9.3k Golang : Temperatures conversion example
+12.1k Golang : Pagination with go-paginator configuration example
+25k Golang : Create PDF file from HTML file