Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- import UIKit
- var word = ""
- var subStringRepeat = false
- word = "repeat"
- subStringRepeat = word.range(of: "repeat", options: .caseInsensitive) != nil ||
- word.range(of: "reoccurring", options: .caseInsensitive) != nil
- print(#line, word, ":", subStringRepeat)
- word = "rePeating"
- subStringRepeat = word.range(of: "repeat", options: .caseInsensitive) != nil ||
- word.range(of: "reoccurring", options: .caseInsensitive) != nil
- print(#line, word, ":", subStringRepeat)
- word = "reoccurring"
- subStringRepeat = word.range(of: "repeat", options: .caseInsensitive) != nil ||
- word.range(of: "reoccurring", options: .caseInsensitive) != nil
- print(#line, word, ":", subStringRepeat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement