首页 > 解决方案 > 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#

解决方案


推荐阅读