Consider two threads with access to the String STR.
考虑两个线程访问String str。
After you invoke that method on the String STR (str.freeze, STR cannot be modified).
对String str调用该方法(str . freeze)之后,str将不能被修改。
For example, if I have a method called draw (String STR), an overloaded version can have the following form: draw (String STR, int I).
例如,如果有一个名为draw (String str)的方法,那么重载的方法可以有以下形式:draw (String str,inti)。
In fact, a string object is an instance of the STR class.
事实上,字符串对象是str类的一个实例。
In Listing 5, the string in STR is modified by the upcase!
在清单5中,str中的字符串由upcase !
In Python 3.0 all strings are unicode (STR is now unicode string) and there is a new type called bytes to hold byte sequences.
在Python 3.0之中,所有的字符串都是unicode的(str就是unicode字符串),并引入了一个叫做bytes的新类型来处理字节序列。
First we use the STR function from Clojure to convert the char to a string.
首先,我们使用Clojure的str函数来将这个char转变为字符串。
But you can also explicitly create a string object by using the STR class constructor, as shown in Listing 6.
但是您也可以使用str类构造函数显式地创建字符串对象,如清单6所示。
We use the STR function to parse the multi-line string literal.
我们使用了str函数来解析这个多行字符串。
Python has a single string type, str, that behaves similarly to the version 2.x unicode type.
Python具有单一的字符串类型str,其功能类似于版本 2.x 的unicode 类型。
The second call to the read method, where you try to assign the value to the str variable, returns an empty string.
在对read方法的第二个调用中,试图把值分配给str变量,结果返回一个空的 string。
One thread could see the STR reference refer to a String object in which the constructor has not run.
一个线程能看见str引用一个String对象,在该对象中构造函数尚未运行。
The only way for StringReader to see the str reference to be anything other than a String object with "hello" as its value is if the problem of out-of-order writes occurs.
如果发生了无序写入问题,则使StringReader看到str引用的惟一方法绝不是值为“hello”的String对象。
The only way for StringReader to see the str reference to be anything other than a String object with "hello" as its value is if the problem of out-of-order writes occurs.
如果发生了无序写入问题,则使StringReader看到str引用的惟一方法绝不是值为“hello”的String对象。
应用推荐