Expand description
This library 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:
abjadreturns a best-effort value, ignoring unrecognized characters.abjad_collect_errorsalso records unrecognized characters in aVec.abjad_strictreturns an error as soon as any character is not recognized.
Structs§
- Abjad
Prefs - We need to allow some options for abjad calculation. At present there are
four: three booleans and one
enum. All of the booleans are false by default. Theenumalso has a default value, which should be suitable for the vast majority of use cases. If you don’t need to change any of the options, then, when calling one of the methods, you can simply passAbjadPrefs::default().
Enums§
- Abjad
Error - The error type for this crate. Currently there is only one member:
UnrecognizedCharacter, which is returned byabjad_strictupon encountering any character outside of the Arabic script. - Letter
Order - This
enumallows for a selection of the letter order for abjad values (Mashriqi by default).
Traits§
- Abjad
- This is the trait that we implement for
&str, allowing us to use the new methods.