Standard library / unicode/utf8

utf8.FullRuneInString()

Reports whether the string starts with a complete rune; invalid leading encoding counts as a full error rune. Expected stdout: 'false true\n'.

Formal Syntax & Structure

go syntaxgo
func FullRuneInString(s string) bool

Parameters & Attributes

NameTypeDescription
sstringInput text or sequence.

Return Value

bool

Reports whether the string starts with a complete rune; invalid leading encoding counts as a full error rune.

Working Example

Example Snippetgo
package main
import (  "fmt"  "unicode/utf8")
func main() {  fmt.Println(utf8.FullRuneInString("\xc3"), utf8.FullRuneInString("é"))}
Go Reference