MCPcopy Create free account
hub / github.com/cantabular/faststringmap / randomSmallString

Function randomSmallString

uint32_store_test.go:97–104  ·  view source on GitHub ↗
(maxLen uint8)

Source from the content-addressed store, hash-verified

95}
96
97func randomSmallString(maxLen uint8) string {
98 var sb strings.Builder
99 n := rand.Intn(int(maxLen) + 1)
100 for i := 0; i <= n; i++ {
101 sb.WriteRune(rand.Int31n(94) + 33)
102 }
103 return sb.String()
104}
105
106func typicalCodeStrings(n int) mapSlice {
107 m := make(map[string]uint32, n)

Callers 1

randomSmallStringsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected