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) boolParameters & Attributes
| Name | Type | Description |
|---|---|---|
| s | string | Input 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("é"))}