@@ -13,7 +13,7 @@ This chapter will introduce them more in-depth together with usage examples.
1313 - [ Dollar Dollar (` $$ ` )] ( #dollar-dollar- )
1414 - [ ` count($ident, depth) ` ] ( #countident-depth )
1515 - [ ` index(depth) ` ] ( #indexdepth )
16- - [ ` length (depth)` ] ( #lengthdepth )
16+ - [ ` len (depth)` ] ( #lengthdepth )
1717 - [ ` ignore($ident) ` ] ( #ignoreident )
1818
1919## Dollar Dollar (` $$ ` )
@@ -128,14 +128,14 @@ fn main() {
128128```
129129
130130
131- ## ` length (depth)`
131+ ## ` len (depth)`
132132
133- The ` length (depth)` metavariable expression expands to the iteration count of the repetition at the given depth.
133+ The ` len (depth)` metavariable expression expands to the iteration count of the repetition at the given depth.
134134
135135- The ` depth ` argument targets the repetition at ` depth ` counting outwards from the inner-most repetition where the expression is invoked.
136136- The expression expands to an unsuffixed integer literal token.
137137
138- The ` length ()` expression defaults ` depth ` to ` 0 ` , making it a shorthand for ` length (0)` .
138+ The ` len ()` expression defaults ` depth ` to ` 0 ` , making it a shorthand for ` len (0)` .
139139
140140
141141``` rust,ignore
@@ -148,8 +148,8 @@ macro_rules! lets_count {
148148 $(
149149 println!(
150150 "'{}' in inner iteration {}/{} with '{}' in outer iteration {}/{} ",
151- stringify!($inner), ${index()}, ${length ()},
152- stringify!($outer), ${index(1)}, ${length (1)},
151+ stringify!($inner), ${index()}, ${len ()},
152+ stringify!($outer), ${index(1)}, ${len (1)},
153153 );
154154 )*
155155 )*
0 commit comments