Skip to content
/ runes Public

runes, utils for []rune and []byte pkg, which is inspired by strings

License

Notifications You must be signed in to change notification settings

Qs-F/runes

Repository files navigation

pkg runes

Go pkg inspried by strings package, for runes.

Although strings and unicode/utf8 pkg is great, but some of them are behaving weirdly.

For example,

  • If the byte slice is incomplete, then utf8.CountXXX counts the length of bytes and add them.

  • strings.Index returns 0 if passing empty string "" to its parameter substr.

With this pkg, these points are fixed.

Test GoDoc Go Report Card

Installation

go get github.com/Qs-F/runes

Usage

See GoDoc

License

MIT