pub fn guess_string(content: impl Into<String>) -> Result<FormatId>Expand description
Guesses the authoritative format for a given String content.
ยงExamples
use ctb_formats_detection::{guess_string, FormatId};
let html = "<!DOCTYPE html><html><body><h1>Header</h1></body></html>";
let format = guess_string(html)?;
assert_eq!(format, FormatId::Html);