c# - c#如何使用contains在句子中查找单词
问题描述
对不起我的英语,因为我不是本地人。
我想知道如何使用包含在句子中找到一个单词。但只有那个词,我将在下面尝试解释它......
Thou showedest thy true colors once thou knewest the truth. It seems that, just like me, thou also wert pretending to be someone thou wert not.
if (Text.Contains("Show")) Console.WriteLine("True");
在这句话中,我想找到“show”,没有那个词,而是“showedest”。所以它会返回假,但它会返回真。我怎么知道 SHOW 和 ONLY SHOW 是否存在?
解决方案
推荐阅读
- c# - 在 json 序列化中包含属性而不是忽略其他属性
- javascript - 如果用户已经访问了相同的页面链接,如何将用户重定向到另一个页面。(这不是登录页面。)
- java - 当试图获取下个月的最后一个日期时,在java中获取明年下个月的最后一个日期
- java - 升级java后Swing看起来放大了
- angular - 防止元素自动处于 :focus 状态
- java - NoClassDefFoundError: org/slf4j/LoggerFactory on Jenkins with gradle
- react-native - 在项目中找不到 child_process - 反应原生
- react-native - 无法在 ios 上读取 pdf 文件(反应原生)
- node.js - 护照 req.login 不会创建 req.user
- datatables - 按需数据表服务器端ajax