Standard library / unicode

unicode.IsOneOf()

Reports whether r appears in at least one table in the slice. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func IsOneOf(ranges []*RangeTable, r rune) bool

Parameters & Attributes

NameTypeDescription
ranges[]*RangeTableUnicode range tables to search.
rruneUnicode code point.

Return Value

bool

Reports whether r appears in at least one table in the slice.

Working Example

Example Snippetgo
package main
import (  "fmt"  "unicode")
func main() {  fmt.Println(unicode.IsOneOf([]*unicode.RangeTable{unicode.Latin, unicode.Arabic}, 'س'))}
Go Reference