Implement Slice for String and str

Closes #17502