All of these types of methods return a new string, never changing the receiver of the message.
所有这类方法都返回一个新字符串,而从来不会改变消息的接收者。
You simply place the desired text inside a pair of quotation marks and voila: a new string (see Listing 1).
只要将所需的文本放入一对引号中,就完成了一个新字符串的创建(参见清单1)。
Add a new string substitution variable named WAS_HOME with the value again pointing to your WAS_HOME directory (Figure 4).
添加一个名为WAS_HOME新的字符串替代变量,它的值仍然指向您的WAS_HOME目录(如图4所示)。
Let's start with a basic plug-in that exposes an extension point for registering new string mappings for a synonym service.
让我们从公开扩展点的基本插件开始,这样可以为同义词服务注册新的字符串映射。
Note that the new string function is under the SYSIBM function path, compared to the older functions under the SYSFUN version.
注意:新的字符串函数位于SYSIBM函数路径下,而旧一些的函数位于SYSFUN路径下。
It then copies the contents of the buffer into a new string on return from the call.
然后,在从调用返回时将该缓冲区的内容复制到新字符串中。
A method that creates and returns a new string is called and the new string is never used.
调用了创建并返回新字符串的方法,但从未使用此新字符串。
The new string that the user types for the item is passed to the event, and the event handler can reject the change.
用户为项键入的新字符串被传递至事件,事件处理程序可以拒绝此更改。
Here, we need to wrap the selected text into the selected style tags and replace the selected text in the document with this new string.
这里我们需要将选中的文本包装到选定的样式标签中,并使用这个新的字符串替换文档里选中的文本。
Therefore, any operation on a string, including string concatenation, produces a new string object, rather than modifying an existing one.
所以,在字符串上的任何操作,包括字符串连接,都产生一个新的字符串对象,而不是更改一个存在的字符串。
Returns a new string that left-aligns the characters in this string by padding them with Spaces on the right, for a specified total length.
传回新字串,此字串会以空格填补右侧至指定的总长度,靠左对齐这个字串中的字元。
The new string-to-codepoints and codepoints-to-string functions of XPath 2.0 give you a means to manipulate the characters that make up a string.
XPath 2.0新增函数string -to -codepoints和codepoints - to -string提供了操纵字符串字符的方法。
That's one unstructured string for the entire document, but with all the new string functions available, you can perform additional processing as needed.
对于整个文档来说它是没有结构的字符串,但是利用新增加的字符串函数,我们可以根据需要执行进一步处理。
If you need the ability to change the characters in a string (as opposed to creating a new string), you might want to use a list of characters instead.
如果你要修改字符串里面的字符(而不是要建立一个新字符串),你最好还是用字符列表吧。
First, you can create a new string by adding other strings together, either using the + operator or by just sticking strings together using the appropriate quotes.
第一,通过将其他字符串添加在一起,可以创建新的字符串,具体方法可以使用+运算符,或者干脆使用适当的引号将字符串连在一起。
Strings are immutable, which means that no matter what operation you do on a string, you will always produce a new string object, rather than mutating the existing string.
字符串是不可变的,也就是说不管你对字符串做何种操作,你总是创建了一个新的字符串对象,而不是改变了原有的字符串。
Builds a new string whose characters are the results of applying a specified function to each of the characters of the input string and concatenating the resulting strings.
生成一个新字符串,其字符是将指定的函数应用于输入字符串的每个字符并连接结果字符串的结果。
The StringBuilder class in the System.Text namespace joins strings together without allocating a new string instance each time; this efficiency greatly improves memory utilization.
Text命名空间中的StringBuilder类无须每次分配新的字符串实例即可将字符串连接在一起;这一效率大大改进了内存的利用。
Because strings are immutable, this approach means a new string will be constructed each time through the loop, with the data copied from the old string and a single character added at the end.
因为字符串是不可变的,所以这种方式意味着每次循环时会构建一个新的字符串,从老的字符串拷贝数据并在最后增加一个字符。
Because strings are immutable, this approach means a new string will be constructed each time through the loop, with the data copied from the old string and a single character added at the end.
因为字符串是不可变的,所以这种方式意味着每次循环时会构建一个新的字符串,从老的字符串拷贝数据并在最后增加一个字符。
应用推荐