findBookNumber static method

int? findBookNumber(
  1. String book
)

Returns the book number from a string.

Implementation

static int? findBookNumber(String book) {
  book = book.toLowerCase();
  var val = BibleData.books[book];
  if (val != null) {
    return val;
  }
  val = BibleData.osisBooks[book];
  if (val != null) {
    return val;
  }
  val = BibleData.shortenedBooks[book];
  if (val != null) {
    return val;
  }
  return BibleData.variants[book];
}