reference_parser 0.5.0 copy "reference_parser: ^0.5.0" to clipboard
reference_parser: ^0.5.0 copied to clipboard

outdated

Parse strings to find the reference to bible verses

reference_parser #

A dart package that parses strings for bible references

Installation #

pub get reference_parser

Usage #

See example/main.dart for a look at the types of strings that can be parsed

import 'package:reference_parser/reference_parser.dart';

var ref = parseString('Gen 1:1');

After importing and creating a reference object, you can view the parsed information through the fields

var ref = parseString('Gen 1:1-5');

ref.book; //Genesis
ref.bookNumber; //1
ref.chapter; //1
ref.startVerse; //1
ref.endVerse; //5
ref.reference; //Genesis 1:1-5
ref.isValid; //true

Note that you can create non-existent references, so always check the isValid field to ensure a reference is correct

You can also directly create reference objects by calling createReference(String book, [int chapter, int startVerse, int endVerse])

var ref = createReference('1Co', 2);
print(ref.reference); //1 Corinthians 2
12
likes
30
pub points
61%
popularity

Publisher

verified publisherpetit.dev

Parse strings to find the reference to bible verses

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

More

Packages that depend on reference_parser