ucase

package
v0.19.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCaseClosure

func AddCaseClosure(c rune, sa propertySet)

func AddPropertyStarts

func AddPropertyStarts(sa propertySet)

func Fold

func Fold(c rune) rune
  • Case folding is similar to lowercasing.
  • The result may be a simple mapping, i.e., a single code point, or
  • a full mapping, i.e., a string.
  • If the case folding for a code point is the same as its simple (1:1) lowercase mapping,
  • then only the lowercase mapping is stored. *
  • Some special cases are hardcoded because their conditions cannot be
  • parsed and processed from CaseFolding.txt. *
  • Unicode 3.2 CaseFolding.txt specifies for its status field:

# C: common case folding, common mappings shared by both simple and full mappings. # F: full case folding, mappings that cause strings to grow in length. Multiple characters are separated by spaces. # S: simple case folding, mappings to single characters where different from F. # T: special case for uppercase I and dotted uppercase I # - For non-Turkic languages, this mapping is normally not used. # - For Turkic languages (tr, az), this mapping can be used instead of the normal mapping for these characters. # # Usage: # A. To do a simple case folding, use the mappings with status C + S. # B. To do a full case folding, use the mappings with status C + F. # # The mappings with status T can be used or omitted depending on the desired case-folding # behavior. (The default option is to exclude them.)

  • Unicode 3.2 has 'T' mappings as follows:

0049; T; 0131; # LATIN CAPITAL LETTER I 0130; T; 0069; # LATIN CAPITAL LETTER I WITH DOT ABOVE

  • while the default mappings for these code points are:

0049; C; 0069; # LATIN CAPITAL LETTER I 0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE

  • U+0130 has no simple case folding (simple-case-folds to itself).

func FoldRunes

func FoldRunes(str []rune) []rune

func FullFolding

func FullFolding(c rune) (rune, []uint16)

func GetTypeOrIgnorable

func GetTypeOrIgnorable(c rune) int32

func IsCaseSensitive

func IsCaseSensitive(c rune) bool

func IsSoftDotted

func IsSoftDotted(c rune) bool

func ToFullLower

func ToFullLower(c rune) rune

func ToFullTitle

func ToFullTitle(c rune) rune

func ToFullUpper

func ToFullUpper(c rune) rune

Types

type Type

type Type int32
const (
	None Type = iota
	Lower
	Upper
	Title
)

func GetType

func GetType(c rune) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL