platform-bible-react
    Preparing search index...

    Function getBookIdFromUSFM

    • Gets book ID from USFM string that starts with the \id marker, and returns book number for it

      Parameters

      • text: string

        USFM string that is expected to start with \id marker

      Returns string

      Book number corresponding to the \id marker in the input text. Returns 0 if no marker is found or the marker is not valid