sedol

Crates.iosedol
lib.rssedol
version0.1.0
sourcesrc
created_at2022-05-18 13:46:06.17887
updated_at2022-05-18 13:46:06.17887
descriptionA crate to validate SEDOLs
homepage
repositoryhttps://github.com/truls-p/sedol
max_upload_size
id588950
size22,793
Truls (truls-p)

documentation

README

Crates.io Workflow Status

sedol

SEDOL

Crate to validate SEDOLs.

https://en.wikipedia.org/wiki/SEDOL

https://www.lseg.com/markets-products-and-services/data-analytics/data-solutions/sedol/documentation

Examples

let sedol_string = "BD9MZZ7";
match sedol::validate(sedol_string) {
   Ok(s) => println!("SEDOL validated: {}", s),
   Err(e) => eprint!("{}", e),
}

let invalid_sedol_string = "BD9MZZ6";
match sedol::validate(invalid_sedol_string) {
   Ok(s) => println!("SEDOL validated: {}", s),
   Err(e) => eprintln!("{}", e),
}

let unclean_sedol_string = " BD9-MZ-Z7?";
match sedol::validate(&sedol::clean(unclean_sedol_string)) {
   Ok(s) => println!("SEDOL validated: {}", s),
   Err(e) => eprintln!("{}", e),
}

let sedol_6_string = "BD9MZZ";
println!("SEDOL with calculated check digit: {}{}", sedol_6_string, sedol::calc_check_digit(sedol_6_string));

Current version: 0.1.0

License: MIT OR Apache-2.0

Commit count: 15

cargo fmt