Go stdlib package — unicode/utf8. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.AppendRune()NeutralAppendRune(p []byte, r rune) []byte
AppendRune appends the UTF-8 encoding of r to the end of p and
.DecodeLastRune()NeutralDecodeLastRune(p []byte) (rune, int)
DecodeLastRune unpacks the last UTF-8 encoding in p and returns the rune and
.DecodeLastRuneInString()NeutralDecodeLastRuneInString(s string) (rune, int)
DecodeLastRuneInString is like DecodeLastRune but its input is a string. If
.DecodeRune()NeutralDecodeRune(p []byte) (rune, int)
DecodeRune unpacks the first UTF-8 encoding in p and returns the rune and
.DecodeRuneInString()NeutralDecodeRuneInString(s string) (rune, int)
DecodeRuneInString is like DecodeRune but its input is a string. If s is
.EncodeRune()NeutralEncodeRune(p []byte, r rune) int
EncodeRune writes into p (which must be large enough) the UTF-8 encoding of the rune.
.FullRune()NeutralFullRune(p []byte) bool
FullRune reports whether the bytes in p begin with a full UTF-8 encoding of a rune.
.FullRuneInString()NeutralFullRuneInString(s string) bool
FullRuneInString is like FullRune but its input is a string.
.RuneCount()NeutralRuneCount(p []byte) int
RuneCount returns the number of runes in p. Erroneous and short
.RuneCountInString()NeutralRuneCountInString(s string) int
RuneCountInString is like RuneCount but its input is a string.
| FQN | Field | |
|---|---|---|
| unicode/utf8 | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import ... # unicode/utf8