func testRandString(tt testing2.TB, f func(int) (string, error), charset string) { s, e := f(32) tt. Eq(e, nil). Eq(32, len(s)). True(strings2.IsAllCharsIn(s, charset)) }
func testRandBytes(tt testing2.TB, f func(int) ([]byte, error), charset string) { s, e := f(32) tt. Eq(e, nil). Eq(32, len(s)). True(strings2.IsAllCharsIn(unsafe2.String(s), charset)) }
func (c Chars) Validate(s string) error { if !strings2.IsAllCharsIn(s, c.Chars) { return c.Err } return nil }