Function voca_rs::split::split

source ·
pub fn split<'a>(subject: &'a str, pattern: &str) -> Vec<&'a str>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
Expand description

Splits subject into an array of chunks by separator.

Arguments

  • subject - The string to split into characters.
  • pattern - The pattern to match the separator.

Example

use voca_rs::*;
split::split("rage against the dying of the light", "");
// => ["rage", "against", "the", "dying", "of", "the", "light"]
use voca_rs::Voca;
"rage against the dying of the light"._split("");
// => ["rage", "against", "the", "dying", "of", "the", "light"]