Function voca_rs::chop::last [−][src]
pub fn last(subject: &str, length: usize) -> String
Expand description
Extracts the last length
characters from subject
.
Arguments
subject
- The string to extract from.length
- The number of characters to extract.
Example
use voca_rs::*;
chop::last("helicopter", 1);
// => "r"
chop::last("błąd", 2);
// => "ąd"
chop::last("e\u{0301}", 1); // or 'é'
// => "\u{0301}"
use voca_rs::Voca;
"helicopter"._last(1);
// => "r"