String.Insert不起作用 [英] String.Insert not working
本文介绍了String.Insert不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我(希望)有一个简单的问题。
I have (hopefully) a simple problem.
String.Insert(0, "test");
尚不起作用:
String.Text += "test";
..?我需要插入,以便可以在字符串中间插入内容。
does..? I need Insert so I can insert something in the middle of a string.
推荐答案
我真是个白痴,即刻的Google搜索
I'm such an idiot, instant Google search fixed this.
String。Insert不会修改调用它的字符串,而是返回带有插入文本的新字符串。
String.Insert does not modify the string it is called on, but instead returns a new string with the inserted text in.
所以我需要:
String = String.Insert(0, "test");
这篇关于String.Insert不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文