Function localeCompare

  • Compare two strings in the current or given locale.

    Parameters

    • x: string

      a string

    • y: string

      another string

    • Optional locales: string | string[]

      language or locale tag(s)

    • Optional options: CollatorOptions

      comparison options

    Returns number

    x<y: -ve, x=y: 0, x>y: +ve

Generated using TypeDoc