Standard library / strconv
strconv.IsPrint()
Reports whether a rune is printable by Go's definition: letters, marks, numbers, punctuation, symbols and ASCII space. Expected stdout: 'true false\n'.
Formal Syntax & Structure
go syntaxgo
func IsPrint(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.IsPrint(' '), strconv.IsPrint('\t'))}