#identifier #stock #equity

sedol

一个用于验证SEDOL的crate。

1 个不稳定版本

0.1.0 2022年5月18日

206金融

Download history 14/week @ 2024-03-31 1/week @ 2024-04-07 13/week @ 2024-06-16 64/week @ 2024-06-23 2/week @ 2024-06-30 47/week @ 2024-07-07 47/week @ 2024-07-14

160 每月下载量

MIT/Apache

10KB
174 代码行

Crates.io Workflow Status

sedol

SEDOL

用于验证SEDOL的crate。

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

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

示例

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));

当前版本:0.1.0

许可证:MIT OR Apache-2.0

无运行时依赖