c# 求提供思路,我str1“i want to eat an apple” str2"i want eat apple"用什么方法可以识别出str2少了to 和an两个单词

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 07:23:07
c# 求提供思路,我str1“i want to eat an apple” str2

c# 求提供思路,我str1“i want to eat an apple” str2"i want eat apple"用什么方法可以识别出str2少了to 和an两个单词
c# 求提供思路,我str1“i want to eat an apple” str2"i want eat apple"用什么方法可以识别出str2少了
to 和an两个单词

c# 求提供思路,我str1“i want to eat an apple” str2"i want eat apple"用什么方法可以识别出str2少了to 和an两个单词
string str1="i want to eat an apple";
string str2="i want eat apple";
Console.WriteLine(str1.Length);
Console.Write(str2.Length);
Console.ReadKey();
第一个长度是22
第二个是16.
str2不就少了吗?