Skip to content

Commit 6964aa1

Browse files
author
WaySLOG
committed
Update 07-04-operator-and-format.md
remove wrong description
1 parent 96d112e commit 6964aa1

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

07-type/07-04-operator-and-format.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ format!("{:?}", "Hello");
153153

154154
另外请记住:type这个地方为空的话默认调用的是`Display`这个trait。
155155

156-
还有两个比较有用的type是`e``E`。他们分别是小写字母和大写字母格式化,别在苦逼兮兮的写大小写转换函数了,Rust早帮你设计好了。
157-
158156
关于`:`号后面的东西其实还有更多式子,我们从上面的`{0:>0width$}`来分析它。
159157

160158
首先`>`是一个语义,它表示的是生成的字符串向右对齐,于是我们得到了 `0081`这个值。与之相对的还有`<`(向左对齐)和`^`(居中)。

0 commit comments

Comments
 (0)