random string swift
func randomString(of length: Int) -> String {
let letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
var s = ""
for _ in 0 ..< length {
s.append(letters.randomElement()!)
}
return s
}
Also in Swift:
- swift pop to specific view controller
- swift change button text
- how to clear text file swift
- number of characters in a string swift
- variadic parameters swift
- white or light ASAuthorizationAppleIDButton “Sign in with Apple” button - Swift
- swift language compiler
- How to find index of list item in Swift?
- for each swiftui
- swift file size from url
- tableview cell animation swift
- swift alert toast
- swift view float on keyboard show
- weather api in ios swift 5
- swift print
- swift comments
- swift open web page
- how can i play video with url in a view in swift
- set in swift
- get device name swift
- generate random bool swift
- swift print struct name
- enum from raw value swift
- how to set return type swift