+
Skip to content

djudd/human-name-rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

human-name-rb

Ruby bindings for the Rust crate human_name, a library for parsing and comparing human names.

See the human_name docs for details.

Examples

  require 'humanname'

  doe_jane = HumanName.parse("Doe, Jane")
  doe_jane.surname
  => "Doe"
  doe_jane.given_name
  => "Jane"
  doe_jane.initials
  => "J"

  j_doe = HumanName.parse("J. Doe")
  j_doe.surname
  => "Doe"
  j_doe.given_name
  => nil
  j_doe.initials
  => "J"

  j_doe == doe_jane
  => true
  j_doe == HumanName.parse("John Doe")
  => true
  doe_jane == HumanName.parse("John Doe")
  => false

Supported environments

Linux, MacOS, and Windows, as of the versions currently supported by GitHub Actions. x86-64 or Apple Silicon. Ruby 2.7 or later.

If you have access to another environment which is supported by the Rust compiler, it should be relatively straightforward to fork the library and add support. You'll need to build human_name, copy the resulting library from target/release/ in that repository to lib/native/<arch>/ in this one, and modify native_lib_path appropriately. If this environment is additionally supported by GitHub Actions, I'm also happy to accept a PR.

About

Ruby bindings for the Rust crate `human_name`, a library for parsing and comparing human names

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载