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
returns0
if passing empty string""
to its parametersubstr
.
With this pkg, these points are fixed.
go get github.com/Qs-F/runes
See GoDoc
MIT