[][src]Function voca_rs::chop::first

pub fn first(subject: &str, length: usize) -> String

Extracts the first length characters from subject.

Arguments

Example

use voca_rs::*;
chop::first("helicopter", 1);
// => "h"
chop::first("błąd", 2);
// => "bł"
chop::first("e\u{0301}", 1); // or 'é'
// => "e"
use voca_rs::Voca;
"helicopter"._first(1);
// => "h"