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.
edited title
Link
R Menke
  • 8.4k
  • 4
  • 40
  • 64

How to split Split a stringString without removing the delimiter in Swift

Source Link
R Menke
  • 8.4k
  • 4
  • 40
  • 64

How to split a string without removing the delimiter in Swift

This might be a duplicate. I couldn't find the answer in Swift, so I am not sure.

componentsSeparatedByCharactersInSet removes the delimiter. If you separate by only one possible character it is easy to add it back. But what when you have a set?

Is there another method to split?