limit

fun String.limit(maxLength: Int, truncate: String = "..."): String

Limits this string to maxLength and adds truncate at the end if the string was shortened-