.Replace("*",“%")的含义是什么 [英] What is the Meaning of .Replace("*", "%")
本文介绍了.Replace("*",“%")的含义是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Textbox1.text.trim().Replace("*",%")是什么意思?
是替换整个字符串吗?
.Replace(?","_%")??
What is the meaning of Textbox1.text.trim().Replace("*", "%") ?
is it for replacing entire string??
what is the meaning of this .Replace("?", "_%")??
推荐答案
将它替换为%和后者取代了? _%.
It replaces all the * in the textbox text with % and the latter one replaces the ? with _%.
您可以自己编写几行代码来获得答案.立即获得结果不是编程的美吗?
无论如何,请尝试以下操作:
You can get the answer yourself by writing few lines of code. Isn''t it the beauty of programming that you get the result immmediatly?
Anyways, try this:
string input = "***Lets try to understand Replace function.*** Should not be that diffcult ?";
Console.WriteLine(input);
Console.WriteLine(input.Replace("*", "%"));
Console.WriteLine(input.Replace("?", "_%"));
我希望你自己得到答案.相信我,它给人的感觉很好. :)
在这里阅读更多有关它的信息:
http://www.dotnetperls.com/replace [ http://msdn.microsoft.com/en-us/library/fk49wtc1.aspx [ ^ ]
I hope you get the answer yourself. Trust me, it gives a great feeling. :)
Read more about it here:
http://www.dotnetperls.com/replace[^]
http://msdn.microsoft.com/en-us/library/fk49wtc1.aspx[^]
Textbox1.text.trim().Replace("*",%").它将textbox1.text
中的所有"*"替换为%"
如果在textbox1.text中具有
我的*投资中的*利润是什么"
它会变成
什么是我的%投资中的利润%"
Textbox1.text.trim().Replace("*", "%") . it replace all "*" with "%" in textbox1.text
if in textbox1.text has
"What is * profit in my * investment"
it will become
"What is % profit in my % investment"
这篇关于.Replace("*",“%")的含义是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文