For any text, it is possible to find the bounds between segments in that text. The most commonly desired segments are 'word' and 'selection' segments. Word Segments represent language-specific words in the text. Selection segments are similar to word segments, but represent the bounds between active selections (ie, if you were actively selecting this text, the bounds would identify where the selection would snap to).
Both word and selection segments are language-specific, and employ that language's word breaking logic to identify these segments within the text. A language tag is recommended to specify the language-behavior rules to use; if no language tag is provided, language-neutral word-breaking rules will be used.
This scenario will allow you to enter a string of text and specify a character index (0-based) within the string, and get the returned word or selection segment that contains the index that was given.