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?: 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: 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
ignore
RESCRIPT
let ignore: t => unit
ignore(collator)
ignores the provided collator and returns unit.
This helper is useful when you want to discard a value (for example, the result of an operation with side effects) without having to store or process it further.