我的主要方法是将字符串zach拆分为单独的数组,大写并删除逗号和句点。我正在尝试编写isNonStopMethod以找到某些停用词(" THE"," BE"," TO"," OF" ,"和"," A"," IN","那'"我"," IT& #34;," ON"," IN"," BUT"," IS"," WITH")发现在字符串扎克。我需要帮助在字符串中搜索这些关键词。
func screenVIP(age: Int, onGuestList: Bool, knowsTheOwner: Bool) {
答案 0 :(得分:1)
使用正则表达式。
http://www.regular-expressions.info/tutorial.html
另外,为了测试你的正则表达式,你可以使用我发现非常有帮助的https://regex101.com/。