Segmenter
t
RESCRIPT
type t
granularity
RESCRIPT
type granularity = [#grapheme | #sentence | #word]
options
RESCRIPT
type options = {
localeMatcher?: Intl_Common.localeMatcher,
granularity?: granularity,
}
pluralCategories
RESCRIPT
type pluralCategories = [
| #few
| #many
| #one
| #other
| #two
| #zero
]
resolvedOptions
RESCRIPT
type resolvedOptions = {
locale: string,
granularity: granularity,
}
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
segment
RESCRIPT
let segment: (t, string) => Intl_Segments.t
ignore
RESCRIPT
let ignore: t => unit
ignore(segmenter)
ignores the provided segmenter 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.