trimEnds

fun String.trimEnds(len: Int = 1): String

Trims whitespace and removes len characters from both ends of this String.

Return

the trimmed substring

Parameters

len

the number of characters to remove from each end (default 1)