Segments
Baseline
2024
Newly available
Since April 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Segments オブジェクトは、テキスト文字列の分割単位を格納した反復可能オブジェクトです。これは、Intl.Segmenter オブジェクトの segment() メソッドを呼び出すことで返されます。
インスタンスメソッド
Segments.prototype.containing()-
指定されたインデックスにあるコード単位を含む、元の文字列内の部分を記述するオブジェクトを返します。
Segments.prototype[Symbol.iterator]()-
分割単位を反復処理するためのイテレーターを返します。
仕様書
| Specification |
|---|
| ECMAScript® 2027 Internationalization API Specification> # sec-segments-objects> |