Crate abjad

source · []
Expand description

This crate is meant to facilitate calculating the numerical abjad value of a string of text in Arabic or Persian (support for other Arabic-script languages may be added over time).

At the moment, this simply adds three methods for &str:

  • abjad returns a best-effort value, ignoring unrecognized characters.
  • abjad_collect_errors also records unrecognized characters in a Vec.
  • abjad_strict returns an error if a character is not recognized.

Structs

We need to allow some options for abjad calculation. At present there are four. All are false by default. If you don’t need to activate any of them, when calling one of the methods, you can input Default::default().

Traits

This is the trait that we implement for &str, allowing us to use the new methods.