Function cst::get_entry

source · []
pub fn get_entry<S: Into<String>>(content: S, key: usize) -> Option<String>
Expand description

Parses a specific entry from a string.

Example

use cst::get_entry;

let input = "1 ^The quick brown fox jumps over the lazy dog.^";
let expect = "The quick brown fox jumps over the lazy dog.";
let entry = get_entry(input, 1);
assert_eq!(entry.unwrap(), expect);