i_splits
This crate add two string splitting methods:
split_i: Split the string in half at the occurenceiof a pattern.split_once_last: Split the string in half at the last occurence of a pattern.
This crate use no dependencies and no unsafe code. This comes at a compromise of having to return Strings instead of &strs, as well as only being able to pass &strs as patterns.
This is due to the fact that the Pattern trait isn't stable yet in std.
Example
use ISplitExt as _;
// split_i
let v = "To show you the power of i_split, I cut that sentence in half!".split_i;
assert_eq!;
let v = "cookie|lolipop|muffin|pancake".split_i;
assert_eq!;
let v = "No splits? That's a `None` for you".split_i;
assert_eq!;
let v = "Don't go too far either!".split_i;
assert_eq!;
// split_once_last
let v = "To show you the power of i_split, I cut that sentence in half!".split_once_last;
assert_eq!;
let v = "cookie|lolipop|muffin|pancake".split_once_last;
assert_eq!;