unsnoc

open fun S.unsnoc(): Pair<S, A>?(source)

Deconstruct an S between its init and last element.