MCPcopy Index your code
hub / github.com/micro-editor/micro / randomString

Function randomString

internal/buffer/buffer_test.go:103–109  ·  view source on GitHub ↗
(length int)

Source from the content-addressed store, hash-verified

101var alphabet = []rune(" abcdeäم📚")
102
103func randomString(length int) string {
104 runes := make([]rune, length)
105 for i := range runes {
106 runes[i] = alphabet[rand.Intn(len(alphabet))]
107 }
108 return string(runes)
109}
110
111func randomText(nLines int) string {
112 lines := make([]string, nLines)

Callers 1

randomTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected