However , the format item is actually interpreted in the following manner 但是,实际是按照以下方式解释该格式项:
The next three characters " 0 : " are interpreted as the start of a format item 之后的三个字符( " { 0 : " )被解释为格式项的开始。
The format items are 格式项为“
Format item syntax 格式项语法
Braces in a format item are interpreted sequentially in the order they are encountered 按照在格式项中遇到大括号的顺序依次解释它们。
A format string that contains zero or more format items , which correspond to objects in the 包含零个或多个格式项的格式字符串,这些项与
Is specified . escaping braces opening and closing braces are interpreted as starting and ending a format item 左大括号和右大括号被解释为格式项的开始和结束。
Multiple format items can refer to the same element in the list of objects by specifying the same parameter specifier 通过指定相同的参数说明符,多个格式项可以引用值列表中的同一个元素。
A composite format string consists of zero or more runs of fixed text intermixed with one or more format items 复合格式化功能返回新的输出字符串,其中嵌入源字符串的每个格式项都被对应的格式化值替换。
One way to write your code to avoid misinterpreting escaped braces and format items is to format the braces and format item separately 在编写代码时,避免错误解释转义大括号和格式项的一种方法是单独显示大括号和格式项。