Segments
A Segments instance is an object that represents the segments of a specific string, subject to the locale and options of its constructing Intl.Segmenter instance. https://tc39.es/ecma402/#sec-segments-objects
t
RESCRIPT
type t
segmentData
RESCRIPT
type segmentData = {
segment: string,
index: int,
isWordLike: option<bool>,
input: string,
}
containing
RESCRIPT
let containing: t => segmentData
containingWithIndex
RESCRIPT
let containingWithIndex: (t, int) => segmentData
ignore
RESCRIPT
let ignore: t => unit
ignore(segments)
ignores the provided segments 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.