get_char

Function get_char 

Source
pub fn get_char(s: &str, i: usize) -> Option<&Char>
Expand description

Get a character reference from a str and an index.

use mut_str::get_char;

let s = "Hello, World!";
let c = get_char(s, 1).unwrap();

assert_eq!(c, 'e');