Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
clarify title
Link
ggorlen
  • 59.3k
  • 8
  • 119
  • 173

How to split a string on spaces in Swift

Post Closed as "Duplicate" by Michael Dautermann, GoZoner, Antonio, memmons, Brad Werth
Source Link
Clement Bisaillon
  • 5.2k
  • 8
  • 37
  • 54

How to split a string in Swift

let string = "hello hi" var hello = "" var hi = "" 

I wan't to split my string so that the value of hello get "hello" and the value of hi get "hi"