std::str: fix .slice_chars example. Fixes #11014.
auto merge of #11065 : huonw/rust/slice-chars-example, r=cmr