Standard Library

GoUnicodeUtf8

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.

Other Methods

.AppendRune()Neutral
#
Signature
AppendRune(p []byte, r rune) []byte

AppendRune appends the UTF-8 encoding of r to the end of p and

.DecodeLastRune()Neutral
#
Signature
DecodeLastRune(p []byte) (rune, int)

DecodeLastRune unpacks the last UTF-8 encoding in p and returns the rune and

.DecodeLastRuneInString()Neutral
#
Signature
DecodeLastRuneInString(s string) (rune, int)

DecodeLastRuneInString is like DecodeLastRune but its input is a string. If

.DecodeRune()Neutral
#
Signature
DecodeRune(p []byte) (rune, int)

DecodeRune unpacks the first UTF-8 encoding in p and returns the rune and

.DecodeRuneInString()Neutral
#
Signature
DecodeRuneInString(s string) (rune, int)

DecodeRuneInString is like DecodeRune but its input is a string. If s is

.EncodeRune()Neutral
#
Signature
EncodeRune(p []byte, r rune) int

EncodeRune writes into p (which must be large enough) the UTF-8 encoding of the rune.

.FullRune()Neutral
#
Signature
FullRune(p []byte) bool

FullRune reports whether the bytes in p begin with a full UTF-8 encoding of a rune.

.FullRuneInString()Neutral
#
Signature
FullRuneInString(s string) bool

FullRuneInString is like FullRune but its input is a string.

.RuneCount()Neutral
#
Signature
RuneCount(p []byte) int

RuneCount returns the number of runes in p. Erroneous and short

.RuneCountInString()Neutral
#
Signature
RuneCountInString(s string) int

RuneCountInString is like RuneCount but its input is a string.

Fully-Qualified Names

FQNField
unicode/utf8fqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # unicode/utf8