An Intl.Segments
instance is an iterable collection of the segments of a text string. It is returned by a call to the segment()
method of an Intl.Segmenter
object.
An Intl.Segments
instance is an iterable collection of the segments of a text string. It is returned by a call to the segment()
method of an Intl.Segmenter
object.
Segments.prototype.containing()
Returns an object describing the segment in the original string that includes the code unit at a specified index.
Segments.prototype[@@iterator]()
Returns an iterator to iterate over the segments.
Desktop | Mobile | Server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | Deno | Node.js | |
@@iterator |
87 |
87 |
No |
No |
73 |
14.1 |
87 |
87 |
No |
62 |
14.5 |
14.0 |
1.8 |
16.0.0 |
Segments |
87 |
87 |
No |
No |
73 |
14.1 |
87 |
87 |
No |
62 |
14.5 |
14.0 |
1.8 |
16.0.0 |
containing |
87 |
87 |
No |
No |
73 |
14.1 |
87 |
87 |
No |
62 |
14.5 |
14.0 |
1.8 |
16.0.0 |
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments