[−][src]Function svalbard::find_chapter_index
pub fn find_chapter_index(
search_string: &str,
chapters_list: [ChapterInfo; 97]
) -> Option<usize>
Used to find the index of a user-inputted chapter name in the CHAPTERS
array. Will not panic if it does not exist, returns None
instead.
Examples
use svalbard::{CHAPTERS, find_chapter_index}; assert_eq!(Some(0), find_chapter_index("1. Getting Started", CHAPTERS));