std::str: Add examples to the StrSlice trait.

Fixes #10819.