gematria 1.0.0+1 icon indicating copy to clipboard operation
gematria: ^1.0.0+1 copied to clipboard

Converts a numerical value to a string of Hebrew letters.

Gematria #

pub package

Dart module for converting a numeric value to a string of Hebrew letters and vice versa. This module is inspired by this package.

Installation #

First, add gematria as a dependency in your pubspec.yaml file.

dependencies:
  gematria: ^1.0.0

Import #

import 'package:gematria/gematria.dart';

Synopsis #

main() {
  final gm = Gematria(
    limit: 0,        // default
    order: false,    // default
    geresh: true,    // default
    punctuate: true, // default
  );

  final output = [
    gm.gematria(5774), // התשע״ד - ordinary
    gm.gematria(5774, limit: 3), // תשע״ד - cropped to 774
    gm.gematria(5774, limit: 7), // התשע״ד - kept at 5774
    gm.gematria(5774, punctuate: false), // 'התשעד' - removed quotation marks
    gm.gematria(5774, punctuate: true), // 'התשע״ד' - with quotation marks
    gm.gematria(5774, geresh: false), // 'התשע"ד' - with quotation marks
    gm.gematria(5774, punctuate: false, limit: 3), // 'תשעד' - options can be combined
    gm.gematria(3), // 'ג׳' - with the geresh
    gm.gematria(3, geresh: false), // - "ג'" - with the apostrophe
    gm.gematria('התשעד', order: true), // 5774 - treats the characters as an ordered number
    gm.gematria('התשעד', order: false), // 779 - Adds up all the characters
  ];

  print(output);
}
0
likes
110
pub points
36%
popularity

Publisher

unverified uploader

Converts a numerical value to a string of Hebrew letters.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

More

Packages that depend on gematria