platform-bible-utils
    Preparing search index...

    Class Collator

    Enables language-sensitive string comparison. Wraps Intl.Collator

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Compares two strings according to the sort order of this Collator object

      Parameters

      • string1: string

        String to compare

      • string2: string

        String to compare

      Returns number

      A number indicating how string1 and string2 compare to each other according to the sort order of this Collator object. Negative value if string1 comes before string2. Positive value if string1 comes after string2. 0 if they are considered equal.

    • Returns a new object with properties reflecting the locale and collation options computed during initialization of this collator object.

      Returns ResolvedCollatorOptions

      ResolvedCollatorOptions object