To split a string into an array of characters in Swift, you can use the map() function to transform each character in the string into an element in the array:
main.swift135 chars4 linesAlternatively, you can use the Array() initializer to create an array of characters from the string:
main.swift105 chars3 linesBoth approaches work well to split a string into an array of characters in Swift.
gistlibby LogSnag