nicknamer

Crates.ionicknamer
lib.rsnicknamer
version0.1.0
created_at2025-11-21 01:49:08.432846+00
updated_at2025-11-21 01:49:08.432846+00
descriptionA tool for generating alternate names.
homepagehttps://github.com/gravitrnic/nicknamer
repositoryhttps://github.com/gravitrnic/nicknamer
max_upload_size
id1942956
size95,274
(gravitrnic)

documentation

README

nicknamer

Simple Rust library to get alternate names/nicknames for a given name.

  • Returns only direct alternates (immediate nicknames), not transitive ones.
  • If a name is not found, an empty vector is returned.
  • Input is matched case-insensitively.
  • Output is a Vec<String> of lowercase alternates (does not include the input itself).
  • Data is embedded at compile time from names.csv (no runtime file I/O).

Library Usage

use nicknamer::nicknames;

fn main() {
    let n = nicknames("Abigail");
    // e.g. ["abbe", "abbey", "abbi", "abbie", "abby", "gail", "nabby", ...]
    println!("{:?}", n);
}

CLI Usage

Build and run with a name argument; outputs a comma-separated list of alternates.

cargo run -- "Abigail"

Example output:

abbe,abbey,abbi,abbie,abby,gail,nabby

Data Source

The nickname dataset in names.csv is derived from the carltonnorthern/nicknames project, which is licensed under the Apache License, Version 2.0.

License

This project is dual-licensed under either of:

  • MIT license (see LICENSE-MIT)
  • Apache License, Version 2.0 (see LICENSE-APACHE)

You may choose either license.

Provenance note: Portions of this repository were generated with the help of AI tooling under the direction of the repository maintainer. Review and verify any third‑party data or content included (e.g., names.csv) for suitability in your use case.

Commit count: 0

cargo fmt