Standard library / unicode/utf8
utf8.RuneStart()
Reports whether a byte could start a UTF-8 rune (not a continuation byte); does not validate an encoding. Expected stdout: 'true false true\n'.
Formal Syntax & Structure
go syntaxgo
func RuneStart(b byte) boolParameters & Attributes
| Name | Type | Description |
|---|---|---|
| b | byte | Byte sequence or second comparison input. |
Return Value
bool
Reports whether a byte could start a UTF-8 rune (not a continuation byte); does not validate an encoding.
Working Example
Example Snippetgo
package main
import ( "fmt" "unicode/utf8")
func main() { fmt.Println(utf8.RuneStart(0xc3), utf8.RuneStart(0xa9), utf8.RuneStart(0xff))}