Created
November 25, 2020 07:42
-
-
Save wiwi-git/0ea6461fc684873320f5f87e81597259 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let range0 = text.range(of: "다라") { | |
let startWord = text[range0].startIndex | |
let endWord = text[range0].endIndex | |
let w0 = text[text.startIndex ..< startWord] | |
let w1 = text[startWord ..< endWord] | |
let w2 = text[endWord ..< text.endIndex] | |
print("\(w0)\n\(w1)\n\(w2)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment