sedol 0.1.0

A crate to validate SEDOLs
Documentation
  • Coverage
  • 100%
    12 out of 12 items documented1 out of 4 items with examples
  • Size
  • Source code size: 22.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.52 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • truls-p/sedol
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • truls-p

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