split

Function split 

Source
pub fn split<'a>(subject: &'a str, pattern: &str) -> Vec<&'a str>
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"]