I'm very new to rust. How I can to get UTF-8 index of char symbol in Rust.
Here you have a reference to utf table.
let bracket = '[';
fn get_utf(c:&[u8])->&str{
// don't know how to obtain utf index
}
let result = get_utf(bracket); // 005B
I tried this function, but it does not work in a way I expect.
This crate might be useful, but I don't know how to use it.
Sorry, not much of my effort.