go/src/unicode/letter.go

const MaxRune

const ReplacementChar

const MaxASCII

const MaxLatin1

type RangeTable

type Range16

type Range32

type CaseRange

type SpecialCase

const UpperCase

const LowerCase

const TitleCase

const MaxCase

type d

const UpperLower

const linearMax

// is16 reports whether r is in the sorted slice of 16-bit ranges.
func is16(ranges []Range16, r uint16) bool {}

// is32 reports whether r is in the sorted slice of 32-bit ranges.
func is32(ranges []Range32, r uint32) bool {}

// Is reports whether the rune is in the specified table of ranges.
func Is(rangeTab *RangeTable, r rune) bool {}

func isExcludingLatin(rangeTab *RangeTable, r rune) bool {}

// IsUpper reports whether the rune is an upper case letter.
func IsUpper(r rune) bool {}

// IsLower reports whether the rune is a lower case letter.
func IsLower(r rune) bool {}

// IsTitle reports whether the rune is a title case letter.
func IsTitle(r rune) bool {}

// lookupCaseRange returns the CaseRange mapping for rune r or nil if no
// mapping exists for r.
func lookupCaseRange(r rune, caseRange []CaseRange) *CaseRange {}

// convertCase converts r to _case using CaseRange cr.
func convertCase(_case int, r rune, cr *CaseRange) rune {}

// to maps the rune using the specified case mapping.
// It additionally reports whether caseRange contained a mapping for r.
func to(_case int, r rune, caseRange []CaseRange) (mappedRune rune, foundMapping bool) {}

// To maps the rune to the specified case: [UpperCase], [LowerCase], or [TitleCase].
func To(_case int, r rune) rune {}

// ToUpper maps the rune to upper case.
func ToUpper(r rune) rune {}

// ToLower maps the rune to lower case.
func ToLower(r rune) rune {}

// ToTitle maps the rune to title case.
func ToTitle(r rune) rune {}

// ToUpper maps the rune to upper case giving priority to the special mapping.
func (special SpecialCase) ToUpper(r rune) rune {}

// ToTitle maps the rune to title case giving priority to the special mapping.
func (special SpecialCase) ToTitle(r rune) rune {}

// ToLower maps the rune to lower case giving priority to the special mapping.
func (special SpecialCase) ToLower(r rune) rune {}

type foldPair

// SimpleFold iterates over Unicode code points equivalent under
// the Unicode-defined simple case folding. Among the code points
// equivalent to rune (including rune itself), SimpleFold returns the
// smallest rune > r if one exists, or else the smallest rune >= 0.
// If r is not a valid Unicode code point, SimpleFold(r) returns r.
//
// For example:
//
//	SimpleFold('A') = 'a'
//	SimpleFold('a') = 'A'
//
//	SimpleFold('K') = 'k'
//	SimpleFold('k') = '\u212A' (Kelvin symbol, K)
//	SimpleFold('\u212A') = 'K'
//
//	SimpleFold('1') = '1'
//
//	SimpleFold(-2) = -2
func SimpleFold(r rune) rune {}