@motion-script/core / caretCount
Function: caretCount()
caretCount(
layout):number
Defined in: render/text-layout.ts:57
The caret slot count implied by a layout — i.e. one past the last character.
Lines exclude their line break, so summing their slots would count the breaks twice and lose the final position; this reads it off the last line instead.
Parameters
layout
Returns
number