Function voca_rs::chop::grapheme_at

source ·
pub fn grapheme_at(subject: &str, position: usize) -> String
Expand description

Get a grapheme from subject at specified position.

Arguments

  • subject - The string to extract from.
  • position - The position to get the grapheme.

Example

use voca_rs::*;
chop::grapheme_at("cafe\u{0301}", 3); // or 'café'
// => "é"
chop::grapheme_at("a̐éö̲", 0);
// => "a̐"
use voca_rs::Voca;
"cafe\u{0301}"._grapheme_at(3); // or 'café'
// => "é"