Documentation ¶
Overview ¶
Package runes provides a small subset of functions for rune slices that are found in the strings and bytes standard packages. For rendering and other logic, it is best to keep raw data in runes, and not having to convert back and forth to bytes or strings is more efficient.
These are largely copied from the strings or bytes packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualFold ¶
EqualFold reports whether s and t are equal under Unicode case-folding. copied from strings.EqualFold
func IndexFold ¶
IndexFold returns the index of given rune string in the text, using case folding (i.e., case insensitive matching). Returns -1 if not found.
func Repeat ¶
Repeat returns a new rune slice consisting of count copies of b.
It panics if count is negative or if the result of (len(b) * count) overflows.
func SetFromBytes ¶ added in v0.3.0
SetFromBytes sets slice of runes from given slice of bytes, using efficient memory reallocation of existing slice. returns potentially modified slice: use assign to update.
Types ¶
This section is empty.