Fix failing test. Code is now aligned with the comment.

This commit is contained in:
Benoit Marty
2023-07-12 09:43:18 +02:00
parent 38ec0f2039
commit 9644091f3f

View File

@@ -64,7 +64,7 @@ fun String?.insertBeforeLast(insert: String, delimiter: String = "."): String {
* Throws if length is < 1.
*/
fun String.ellipsize(length: Int): String {
require(length > 1)
require(length >= 1)
if (this.length <= length) {
return this