Skip to content

radxene/gematria_dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages