Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Split a String into an array in Swift

let fullName = "First Last"    
let fullNameArr = fullName.components(separatedBy: " ")
let firstName = fullNameArr[0] //First
let lastName = fullNameArr[1] //Last
 
PREVIOUS NEXT
Tagged: #Split #String #array #Swift
ADD COMMENT
Topic
Name
1+2 =