Standard library / unicode/utf8
utf8.FullRune()
Reports whether input starts with a complete rune; invalid leading encoding counts as a full width-one error rune. Expected stdout: 'false true\n'.
Formal Syntax & Structure
go syntaxgo
func FullRune(p []byte) boolParameters & Attributes
| Name | Type | Description |
|---|---|---|
| p | []byte | Byte sequence or destination buffer, as specified. |
Return Value
bool
Reports whether input starts with a complete rune; invalid leading encoding counts as a full width-one error rune.
Working Example
Example Snippetgo
package main
import ( "fmt" "unicode/utf8")
func main() { fmt.Println(utf8.FullRune([]byte{0xc3}), utf8.FullRune([]byte{0xff}))}