pub fn strip_utf8_bom(s: &str) -> &strExpand description
Strips a leading UTF-8 BOM if present (Rules: remove BOM before parse).
ยงExamples
use ssh_cli::json_wire::{strip_utf8_bom, UTF8_BOM};
assert_eq!(strip_utf8_bom("{\"ok\":true}"), "{\"ok\":true}");
let with_bom = format!("{UTF8_BOM}{{\"ok\":true}}");
assert_eq!(strip_utf8_bom(&with_bom), "{\"ok\":true}");