strip_bom 1.0.0

Add a simple BOM striping feature for `str` and `String`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strip_bom::StripBom;

fn main()
{
 let my_string: String = std::fs::read_to_string("tests/bom-sushi.txt").unwrap();

 // In this time, my_string has the BOM => true 🍣
 println!("{} {}", my_string.starts_with("\u{feff}"), &my_string);

 // Strip BOM
 let my_string: &str = my_string.strip_bom();

 // my_string (slice) has not the BOM => false 🍣
 println!("{} {}", my_string.starts_with("\u{feff}"), &my_string);
}