Some years ago, I wrote NameParserSharp, a C# name parsing library for a personal need. I published it on NuGet, and I was recently surprised to find it had over 83k downloads – not a huge number compared to other libraries, but way more than I had expected. So as I’ve been trying to find something to do with my exploits in Rust, I decided this would be a reasonable baby step toward producing something more than toy Hello, World! projects.

I have spent the last few days poking around with trying to implement something analogous in Rust. Today, I have now published NameParser v0.1.0 on crates.io. Usage looks like this:

let p = PersonName::parse("Johannes Diderik van der Waals").unwrap();
assert_eq!(p.first, "Johannes");
assert_eq!(p.middle, "Diderik");
assert_eq!(p.last, "van der Waals");
assert_eq!(p.suffix, "");

Now on to something bigger and better.