windowedSequence

fun CharSequence.windowedSequence(size: Int, step: Int = 1, partialWindows: Boolean = false): Sequence<String>(source)

Returns a sequence of snapshots of the window of the given size sliding along this char sequence with the given step, where each snapshot is a string.

Several last strings may have fewer characters than the given size.

Both