This is the latest docs version
Quick Links
  • -Overview
  • -Language Features
  • -JS Interop
  • -Build System
Documentation
Language Manual
Reference for all language features
ReScript & React
First class bindings for ReactJS
GenType
Seamless TypeScript integration
Reanalyze
Dead Code & Termination analysis
Exploration
Packages
Explore third party libraries and bindings
Syntax Lookup
Discover all syntax constructs
APIPlaygroundBlogCommunity
  • Playground
  • Blog
  • X
  • Bluesky
  • GitHub
  • Forum
Core Module
Overview
Core
submodules
  • Array
  • ArrayBuffer
  • AsyncIterator
  • BigInt
  • BigInt64Array
    • Constants
    BigUint64Array
    • Constants
  • Console
  • DataView
  • Date
    • UTC
  • Dict
  • Error
    • URIError
    • TypeError
    • SyntaxError
    • ReferenceError
    • RangeError
    • EvalError
  • Exn
  • Float
    • Constants
    Float32Array
    • Constants
    Float64Array
    • Constants
    Int
    • Constants
    Int16Array
    • Constants
    Int32Array
    • Constants
    Int8Array
    • Constants
    Intl
    • Segments
    • Segmenter
    • RelativeTimeFormat
    • PluralRules
    • NumberFormat
      • Grouping
    • Locale
    • ListFormat
    • DateTimeFormat
    • Collator
      • t
        t
      • t
        usage
      • t
        sensitivity
      • t
        caseFirst
      • t
        options
      • t
        resolvedOptions
      • t
        supportedLocalesOptions
      • v
        make
      • v
        supportedLocalesOf
      • v
        resolvedOptions
      • v
        compare
    • Common
  • Iterator
  • JSON
    • Decode
    • Encode
    • Classify
  • List
  • Map
  • Math
    • Int
    • Constants
  • Null
  • Nullable
  • Object
  • Option
  • Ordering
  • Promise
  • RegExp
    • Result
  • Result
  • Set
  • String
  • Symbol
  • Type
    • Classify
  • TypedArray
  • Uint16Array
    • Constants
    Uint32Array
    • Constants
    Uint8Array
    • Constants
    Uint8ClampedArray
    • Constants
  • WeakMap
  • WeakSet
  • API / Core / Intl / Collator

    Collator

    t

    RESCRIPT
    type t

    usage

    RESCRIPT
    type usage = [#search | #sort]

    sensitivity

    RESCRIPT
    type sensitivity = [#accent | #base | #case | #variant]

    caseFirst

    RESCRIPT
    type caseFirst = [#"false" | #lower | #upper]

    options

    RESCRIPT
    type options = { localeMatcher?: Core__Intl__Common.localeMatcher, usage?: usage, sensitivity?: sensitivity, ignorePunctuation?: bool, numeric?: bool, caseFirst?: caseFirst, }

    resolvedOptions

    RESCRIPT
    type resolvedOptions = { locale: string, usage: usage, sensitivity: sensitivity, ignorePunctuation: bool, collation: [ | #compat | #default | #dict | #emoji | #eor | #phonebk | #phonetic | #pinyin | #stroke | #trad | #unihan | #zhuyin ], numeric?: bool, caseFirst?: caseFirst, }

    supportedLocalesOptions

    RESCRIPT
    type supportedLocalesOptions = { localeMatcher: Core__Intl__Common.localeMatcher, }

    make

    RESCRIPT
    let make: (~locales: array<string>=?, ~options: options=?) => t

    supportedLocalesOf

    RESCRIPT
    let supportedLocalesOf: (array<string>, ~options: supportedLocalesOptions=?) => t

    resolvedOptions

    RESCRIPT
    let resolvedOptions: t => resolvedOptions

    compare

    RESCRIPT
    let compare: (t, string, string) => int
    Types and values
    • t
      t
    • t
      usage
    • t
      sensitivity
    • t
      caseFirst
    • t
      options
    • t
      resolvedOptions
    • t
      supportedLocalesOptions
    • v
      make
    • v
      supportedLocalesOf
    • v
      resolvedOptions
    • v
      compare

    © 2024 The ReScript Project

    Software and assets distribution powered by KeyCDN.

    About
    • Community
    • ReScript Association
    Find us on