Standard library / unicode

unicode.IsPunct()

Tests Unicode punctuation category P. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func IsPunct(r rune) bool

Parameters & Attributes

NameTypeDescription
rruneUnicode code point.

Return Value

bool

Tests Unicode punctuation category P.

Working Example

Example Snippetgo
package main
import (  "fmt"  "unicode")
func main() {  fmt.Println(unicode.IsPunct('؟'))}
Go Reference