Standard library / strconv
strconv.IsGraphic()
Reports whether a rune is graphic according to Unicode categories including space separators. Not equivalent to being ASCII. Expected stdout: 'true false\n'.
Formal Syntax & Structure
go syntaxgo
func IsGraphic(r rune) boolParameters & Attributes
| Name | Type | Description |
|---|---|---|
| r | rune | Unicode code point to inspect or quote. |
Return Value
bool
Whether the input satisfies the documented predicate.
Working Example
Example Snippetgo
package main
import ( "fmt" "strconv")
func main() { fmt.Println(strconv.IsGraphic('界'), strconv.IsGraphic('\n'))}