nextIndex

fun nextIndex(index: Int, direction: Int, word: Boolean): Int