/* * Copyright 2026 Oleg Borodin * * This work is published and licensed under a Creative Commons * Attribution-NonCommercial-NoDerivatives 4.0 International License. * * Distribution of this work is permitted, but commercial use and * modifications are strictly prohibited. */ /* * Copyright 2019 Oleg Borodin */ package auxtool import ( "math/rand" ) func RandomString(n int) string { const letters = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" arr := make([]byte, n) for i := range arr { arr[i] = letters[rand.Intn(len(letters))] } return string(arr) }