Documentation ¶
Overview ¶
Package runerange provides operations on rune ranges.
A rune range is a slice of pairs of runes where each pair represents all the runes from the first rune of the pair to the second one (inclusive). Thus, the range ['0', '9'] represents the runes '0', '1', '2', '3', '4', '5', '6', '7', '8', and '9'. The range ['0', '9', 'a', 'z'] represents the digits and the lowercase latin letters. A range containing a single rune 'a' is represented as ['a', 'a']. Rune pairs should be ordered by the unicode value of the first rune of the pair and should not intersect. The slices ['9', '0'], ['a', 'z', '0', '9'], ['a', 'o', 'b', 'z'] and ['a', 'b', 'c', 'z'] are not valid ranges.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add adds a rune to the range (maybe modifying the original range) and returns the new range.
func Fold ¶
Fold returns a range containing all the runes from the original range and all the runes that can be obtained from them by using unicode case folding. The original range is not modified.
Types ¶
This section is empty.