显然,将日期格式设置为字符串代价高昂。
请注意,我们必须将输出方法设置为text,这样它才有正确的格式文本(而且字符实体不被转义)。
Notice that we had to set the output method to text so that it is properly formatted (and the character entities are not escaped).
它然后将消息主体设置为一个字符串,该字符串的用户和消息数据被编码为post格式。
It then sets the body of the message to a string that has the user and message data encoded in POST format.
更改您的格式栏设置,使您的电子邮件有一个名字,你的名字,而不是一个空白或者一些特殊字符。
Change your Settings so that email from you has a name your name not a blank or some unusual characters in the from field.
转换将包括重新设置消息的格式、连接字符串,并基于某些字段的值执行数字计算。
The transformation will include reformatting of the message, concatenating the string, and doing a numeric calculation based on the values of certain fields.
其中第一种用法,即用XML发送请求,需要将请求的格式设置为 XML,可以使用API来完成,也可以与文本连成字符串,然后将结果发送到服务器。
The first of these -- to send a request in XML -- requires you to format your request as XML, either using an API to do so or just stringing together the text, and then sending the result to a server.
清单2示范了使用DOM创建XML字符串和XML文档并设置格式以便查看。
Listing 2 illustrates the use of the DOM to create an XML string and XML document, formatted for your viewing pleasure.
语言环境设置会导致printf中的%l s格式说明符调用wcsrtombs函数以便于将宽字符的参数字符串转换成依赖语言环境的多字节编码。
The locale setting will cause the % ls format specifier in printf to call the wcsrtombs function in order to convert the wide character argument string into the locale-dependent multi-byte encoding.
提示:可以通过启用xfdl格式选项中的必填选项或在XForms绑定中将必要选项设置为true来使字符串字段成为必填字段。
TIP: You can make a string field mandatory by either enabling the mandatory option in the XFDL format option or setting required to true in an XForms bind.
最里面的print语句使用了一个名为字符串格式化的新概念来创建格式设置精美的表。
The innermost print statement utilizes a new concept, called string formatting to create a nicely formatted table.
OrderDate的值是通过调用Bind表达式并向它传递GridView的关联数据源中列的名称和一个可选的数据格式字符串表达式来设置的。
The value for the OrderDate is set by calling the Bind expression and passing to it the name of the column in the GridView's associated data source and an optional data format string expression.
字符串格式化是一种非常有用的技术,用于以格式设置精美的布局创建由不同数据类型组成的string。
String formatting is a powerful technique for creating a string composed of different data types in a nicely formatted layout.
获取行中最后一个字符后面的字符数,这可能会导致重新对当前行进行格式设置。
Gets the number of characters following the last character of the line that may trigger reformatting of the current line.
这些被为了使用格式设置指令仅,然后将这些说明带到分别创建一个屏幕显示、鏂囨湰鏂囦欢、打印机页或字符串,设计。
These are designed to consume formatting instructions only, and then take those instructions to construct a screen display, a text file, a printer page or a string, respectively.
写入一个标记元素的开始标记,该标记元素包含实现指定样式的布局和字符格式设置的特性。
Writes the opening tag of a markup element that contains attributes that implement the layout and character formatting of the specified style.
使用指定的格式和区域性特定格式设置信息,将此实例的数值转换为其等效字符串表示形式。
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific formatting information.
下面的示例用前导零设置若干个整数值的格式,以使格式化数字的总长度至少有八个字符。
The following example formats several integer values with leading zeros so that the total length of the formatted number is at least eight characters.
所用格式化通过用一个(与区域设置有关的)字符将小数点左边的数字按组分隔开,使得大数更容易阅读。
The formatting used makes large numbers easier to read by separating groups of digits to the left of the decimal point with a (locale dependent) character.
将数字的格式设置为字符串时,可能不会显示预期值。
When formatted as a string, the number may not show the expected value.
返回可使用指定标准格式字符串对日期和时间值进行格式设置的所有模式。
Returns all the patterns in which date and time values can be formatted using the specified standard format string.
具有所应用格式设置的字符串副本。
使用指定的区域性特定格式设置信息,将数字的指定字符串表示形式转换为等效的64位带符号整数。
Converts the specified string representation of a number to an equivalent 64-bit signed integer, using the specified culture-specific formatting information.
根据“应用程序中的域名国际化方案(IDNA)”标准设置字符串的格式。
The string is formatted according to the Internationalizing Domain Names in Applications (IDNA) standard.
上述格式中的时间字符串部分为你想设置的时间值,注意年月日与时分秒中的空格。
The format string portion of the time you want to set time value, pay attention to date in the spaces with the minutes and seconds.
使用指定的区域性特定的格式设置创建该对象的字符串表示形式。
Creates a string representation of this object using the specified culture-specific formatting.
将带格式的字符串设置为指定的输入字符串,然后输出移除位置和描述性信息。
Sets the formatted string to the specified input string, and then outputs the removal position and descriptive information.
使用指定的区域性特定格式设置信息,将逻辑值的指定字符串表示形式转换为其等效的布尔值。
Converts the specified string representation of a logical value to its Boolean equivalent, using the specified culture-specific formatting information.
下面的代码示例演示如何使用正则表达式验证字符串的格式设置。
The following code example demonstrates the use of regular expressions to verify the formatting of a string.
使用指定的区域性特定格式设置信息,将数字的指定字符串表示形式转换为等效的64位无符号整数。
Converts the specified string representation of a number to an equivalent 64-bit unsigned integer, using the specified culture-specific formatting information.
基于指定的区域性特定格式设置信息创建此对象的字符串表示形式。
Creates a string representation of this object based on the specified culture-specific formatting information.
应用推荐