Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

random string swift

func randomString(of length: Int) -> String {
    let letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    var s = ""
    for _ in 0 ..< length {
        s.append(letters.randomElement()!)
    }
    return s
}
Comment

PREVIOUS NEXT
Code Example
Swift :: How to convert radians to degrees swift ui 
Swift :: on swipe get contentoffset swift collectionview 
Swift :: tellraw minecraft 
Swift :: swiftui width screen 
Swift :: swift + data to string 
Swift :: swift append element to array 
Swift :: play sound in swift 5 
Swift :: find object in array by property swift 
Swift :: swift ui image on button 
Swift :: custom screen presentation controller coner radius swift 
Swift :: How to change the backgroundColor of UIDatePicker or UIPicker ? 
Swift :: xcode label rotate text 
Swift :: swift ui font color 
Swift :: firestore subcollection swift 
Swift :: swift 5 make a phone call 
Swift :: change button text in swift 
Swift :: swiftui full screen sheet 
Swift :: index string swift 
Swift :: Thread 1: breakpoint 1.1 
Swift :: get day difference between two dates swift 
Swift :: swift add programmatically width height constraint to view 
Swift :: swift loop through 2 arrays at once 
Swift :: swft image 
Swift :: objective c vs swift 
Swift :: guard let swift 
Swift :: swift extension Array with type 
Swift :: swift resource exceeds maximum size 
Swift :: swift firebase realtime db class 
Swift :: repeat...while Loop Swift 
Swift :: swift do catch where 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =