Initial commit

This commit is contained in:
Johan
2026-01-26 00:37:35 +01:00
commit f303cb46b7
30 changed files with 2251 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
//
// RandomConfirmationCode.swift
// ExodaiAcademy
//
// Created by Exodai on 23/01/2026.
//
import Foundation
extension String {
static func randomConfirmationCode(length: Int = 8) -> String {
let characters = Array("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
var result = ""
result.reserveCapacity(length)
for _ in 0..<length {
let index = Int.random(in: 0..<characters.count)
result.append(characters[index])
}
return result
}
}