I would expect next_back() to include the separator before the string, i.e. the separator that separates the item from the next one. However:
"a+b+c".split_inclusive('+').collect::<Vec<_>>()
// => vec!["a+", "b+", "c"]
"a+b+c".split_inclusive('+').rev().collect::<Vec<_>>()
// => vec!["c", "b+", "a+"], but I'd expect vec!["+c", "+b", "a"]
Playground
If this behaviour is intended, it should be documented.
I would expect
next_back()to include the separator before the string, i.e. the separator that separates the item from the next one. However:Playground
If this behaviour is intended, it should be documented.