Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Segments.prototype.containing()

2 tags 1 category

The containing() method of Segments instances returns an object describing the segment in the string that includes the code unit at the specified index.

Return value: An object describing the segment of the original string with the following properties, or undefined if the supplied index value is out of bounds.

Return value: segment A string containing the segment extracted from the original input string. index The code unit index in the original input string at which the segment begins. input The complete input string that was segmented. isWordLike A boolean value only if granularity is “word”; otherwise, undefined. If granularity is “word”, then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false.

Syntax example: containing(codeUnitIndex)

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…