Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RangeTo<usize>
SliceIndex<str>
1 parent 04bf0dc commit 01734a3Copy full SHA for 01734a3
examples/tokiomarine2020-a.rs
@@ -25,8 +25,9 @@ fn main() {
25
//
26
// `ascii`クレートを使わずに行うなら、
27
28
- // 1. Sを`String`として読み、`s.chars().take(3).collect::<String>()`
29
- // 2. Sを[`proconio::marker::Bytes`]経由で`Vec<u8>`として読み(あるいは`String`から`.into_bytes()`する)、`std::str::from_utf8(&s[..3]).unwrap()`
+ // 1. Sを`String`として読み、`&s[..3]`としてスライスを取得する
+ // 2. Sを`String`として読み、`s.chars().take(3).collect::<String>()`
30
+ // 3. Sを[`proconio::marker::Bytes`]経由で`Vec<u8>`として読み(あるいは`String`から`.into_bytes()`する)、`std::str::from_utf8(&s[..3]).unwrap()`
31
32
// の2つの方法がある。
33
0 commit comments