请帮我解决String的问题 [英] Please help me for question of String
本文介绍了请帮我解决String的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello Everbody.Please帮我解决字符串问题
我有一个String.Eg:truon @ gtmabc@ fdfdmlonghg
我要替换@和字符之间的字符(它非常接近字符)
Bellow:
输入:truon @ gtmabc@fdfdmlonghg
输出:truon @ gtmabc@ fdfdm9 longhg
谢谢你非常
Hello Everbody.Please help me for question of String
I have one String.Eg: truon@gtm"abc "@fdfdm" longhg
I want replace " character that it between @ and " " character( it is close very to " " character)
Bellow:
input: truon@gtm"abc "@fdfdm" longhg
output: truon@gtm"abc "@fdfdm9 longhg
Thank you very much
推荐答案
你不能替换字符串中的任何东西,因为这种类型是 immutable ;所有字符串函数返回字符串创建一个全新的字符串对象。包括String.Replace
。
所有你需要的是: http://msdn.microsoft.com/en-us/library/system.string.aspx [ ^ ] 。
这就是你需要的东西更多: Microsoft Q209354 。
-SA
You cannot replace anything in a string, because this type is immutable; all string functions returning string create a brand new string object. IncludingString.Replace
.
All you need is this: http://msdn.microsoft.com/en-us/library/system.string.aspx[^].
And this is what your need much more: Microsoft Q209354.
—SA
这篇关于请帮我解决String的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文