Documentation
¶
Index ¶
- func CharacterCount(b []byte) int
- func CharacterCountInString(str string) int
- func Clamp(val, min, max int) int
- func DecodeCharacter(b []byte) (rune, []rune, int)
- func DecodeCharacterInString(str string) (rune, []rune, int)
- func RunePos(b []byte, i int) int
- func SliceEnd(slc []byte, index int) []byte
- func SliceStart(slc []byte, index int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CharacterCount ¶
CharacterCount returns the number of characters in a byte array Similar to utf8.RuneCount but for unicode characters
func CharacterCountInString ¶
CharacterCountInString returns the number of characters in a string Similar to utf8.RuneCountInString but for unicode characters
func DecodeCharacter ¶
DecodeCharacter returns the next character from an array of bytes A character is a rune along with any accompanying combining runes
func DecodeCharacterInString ¶
DecodeCharacterInString returns the next character from a string A character is a rune along with any accompanying combining runes
func RunePos ¶
RunePos returns the rune index of a given byte index Make sure the byte index is not between code points
func SliceEnd ¶
SliceEnd returns a byte slice where the index is a rune index Slices off the start of the slice
func SliceStart ¶
SliceStart returns a byte slice where the index is a rune index Slices off the end of the slice
Types ¶
This section is empty.