它用于诸如字符串常量和类之类的对象。
说明:字符串常量开头和1不分隔。
说明:混合或图形字符串常量无效。
说明:混合或图形字符串常量无效。
双引号包围的字符串常量。
导入合适的语言翻译文件到一个字符串常量。
Importing the appropriate language translation file as a string constant.
端线转义字符串常量是重要的因为它分开一个令牌。
Endline escaping is important for string constants only because it breaks apart a token.
具有相同值的字符串常量是由VM规范保证使用同一个实例的。
Strings constants with the same value are guaranteed by the VM specification to use the same instance.
对于Unicode数据库,您应使用主机变量来代替字符串常量。
For a Unicode database, you should use host variables instead of using string constants.
一个字符串常量识别一个特定事件,一个事件类中可以有一个或多个常量。
A string constant identifies the specific event, and you can have one or more constants in each event class.
清单3显示了使用php名称空间定义本地和全局字符串常量的一个例子。
Listing 3 shows an example of using PHP namespaces to define local and global string constants.
实现单词搜索字符串常量最高评价的两个词或三是比拟事实的目标。
Achieving constant top ratings for two-word or three-word search strings is a more realistic goal.
这些都是普通的字符串常量,这意味着你可以将它们任意分配。例如。
These are like normal string constants, that means you can assign them to any string. For example.
第一个define语句在名称空间 test 中创建一个字符串常量ASTRING。
Well, the first define statement creates a string constant called ASTRING in the test namespace.
住在文本段,它是只读的,除了花絮,如字符串常量存储所有你的代码中的字符串。
The string lives in the text segment, which is read-only and stores all of your code in addition to tidbits like string literals.
字符串字面值表示由字符序列构成的字符串常量。有两种格式:原始字符串字面值和解释字符串字面值。
A string literal represents a string constant obtained from concatenating a sequence of characters. There are two forms: raw string literals and interpreted string literals.
这里不需要调用一个字符一个字符地进行比较的equals函数,相反,您可以通过引用将解析器报告的名称与字符串常量进行比较。
Instead of making calls to equals which compares strings character by character, you can compare names reported by the parser against string constants by reference.
在这种情况下,可以使用resourcebundle类(请参阅清单3)来查找已翻译好的字符串常量,并将国际化字符串置入xml数据中。
In this case the ResourceBundle class (see Listing 3) can be used to look up translated string constants and to include the internationalized strings in the XML data.
在使用图8中的Add/Edit对话框构建消息元素目标时,您将Type字段保留为String,以便Value 字段是所希望的字符串常量。
When you constructed the message element target using the Add/Edit dialog in Figure 8, you left the Type field as String so that the Value field could be the desired string constant.
如果您提前知道要进行编码转换的字符串的内容,最好为该字符串创建一个xmlch字符串常量,如清单5所示,而不是调用XMLString:transcode 。
If you know the content of the string to be transcoded ahead of time, then it's better to create an XMLCh string constant for the string, as in Listing 5, instead of calling XMLString: : transcode .
这可以确保在代码中重复使用相同的常量字符串时,可以利用相同的字符串引用。
This ensures that repeated use of the same constant strings in your code will utilize the same string reference.
其他的例子有字符串的地址和常量池入口的内部位置。
Other examples are addresses of strings and the internal locations of constant pool entries.
注意,RSS_URI常量代表默认前缀,因此一个空字符串用作前缀。
Note that the RSS_URI constant represents the default prefix, so an empty string is used as the prefix.
为便于使用,我们定义了一个eventconstants类来声明一些有用的常量,例如主题字符串。
For ease of use, we define a EventConstants class to declare some useful constants such as topic strings.
第二个case表达式在Person的firstName部分使用了一个通配符,但在lastName 部分使用常量字符串Neward 来匹配,在age 部分使用通配符来匹配。
The second case expression uses a wildcard for the firstName part of Person but matches against the constant string Neward in the lastName part and wildcards against the age part.
事实上,‘astring’是一个不能修改的常量字符串。
evaluate()方法拥有两个参数:一个字符串XPath,一个DOM树(用来针对其计算该 XPath),还有一个 XPath常量表示返回类型。
The evaluate() method takes two arguments: a string XPath, a DOM tree to evaluate that XPath against, and an XPath constant indicating the return type.
string模块包含了几种类型的事物,如函数、方法和类;它还包含了公共常量的字符串。
The string module contains several types of things, such as functions, methods, and classes; it also contains strings of common constants. For example
使用传递给该方法的xpath字符串调用evaluate,在类的构造函数中构建的dom树和常量指示将结果作为一组节点返回。
Evaluate is called with the XPath string passed into the method, the DOM tree you built in the class's constructor, and the constant indicating to return results as a list of nodes.
例如,Python有一个内置的“ % ”操作符,它就执行格式化操作(“ % ”前面的参数就是指定的格式),因此要确保攻击者不会控制这个格式,也就是说使用常量作为字符串的格式。
For example, Python has a built-in "%" operator that does formatting (the argument before "%" is the format), so make sure the attacker can't control the format, say by making it a constant.
应用推荐