生成指定长度的随机字符串

extension String{

    static let random_str_characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

    static func randomStr(len : Int) -> String{
        var ranStr = ""
        for _ in 0..

你可能感兴趣的:(生成指定长度的随机字符串)