Qs-F / runes

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

Home Page:https://pkg.go.dev/github.com/Qs-F/runes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

https://pkg.go.dev/github.com/Qs-F/runes

License:MIT License


Languages

Language:Go 99.7%Language:Makefile 0.3%