Skip to content
pixi-silk
GitHub repository
Function

nextWordStop

import { nextWordStop } from 'pixi-silk/text';
function nextWordStop(
   text: string, 
   index: number, 
   mac?: boolean
): number;

Where a word jump to the right lands. mac (the default on Apple platforms) stops at the end of the next word, like Option + Right. Otherwise it stops at the start of the word after, like Ctrl + Right.

Parameters#

ParameterType
textstring
indexnumber
macboolean

Returns#

number