#betacode #linguistics #biblical-greek #assume #beta-code

betacode2

A fast rust library for conversion to and from betacode

10 releases (5 stable)

1.0.6 Aug 24, 2024
1.0.0 Jun 20, 2024
0.1.5 Jun 20, 2024
0.1.4 Jul 2, 2023

#783 in Parser implementations

MIT license

24KB
531 lines

A fast rust library for conversion to and from betacode. Includes support for TLG betacode, and standard betacode.

Examples

Convert Robinson-Pierpont style betacode into unicode Greek:

use betacode2::{Betacode, Type::Default};
let word = "Qeo/v".to_greek(Default).unwrap();

Convert TLG style betacode into unicode Greek:

use betacode2::{Betacode, Type::TLG};
let word = "*qeo/s".to_greek(TLG).unwrap();

The default converter assumes lowercase ascii letters are lowercase Greek letters and uppercase ascii letters are uppercase Greek letters. The TLG converter assumes all letters are always lowercase unless an asterix appears before the letter.


lib.rs:

A fast rust library for conversion to and from betacode. Includes support for standard and TLG betacode.

Examples

Convert Robinson-Pierpont style betacode into unicode Greek:

use betacode2::{Betacode, Type::Default};

let word = "Qeo/v".to_greek(Default).unwrap();
assert_eq!(word, "Θεός");

Convert TLG style betacode into unicode Greek:

use betacode2::{Betacode, Type::TLG};

let word = "*QEO/S".to_greek(TLG).unwrap();
assert_eq!(word, "Θεός");

The default converter assumes lowercase ascii letters are lowercase Greek letters and uppercase ascii letters are uppercase Greek letters. The TLG converter assumes all letters are always lowercase unless an asterix appears before the letter.

No runtime deps