pub fn write_svg_from_hashed_string<T: Write>(
string: String,
target: T,
) -> Result<(), Error>
Expand description
Converts text to an icon (via hashing) and writes it as svg data. The same text will always result in the same icon.
ยงExamples
use random_icon_lib::write_svg_from_hashed_string;
let my_string = "Lorem ipsum dolor sit amet...".to_string();
let mut file = std::fs::File::create("./tests/my_svg_file.svg").unwrap();
write_svg_from_hashed_string(my_string, file).unwrap();