Skip to content

Commit a7467cf

Browse files
author
Kaleidox
committed
manual update command and improve error logging
1 parent 162fcb7 commit a7467cf

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.comroid.api.text;
2+
3+
public final class StringUtil {
4+
public static String maxLength(String string, int maxLength) {
5+
return string.length() <= maxLength ? string : string.substring(0, maxLength);
6+
}
7+
8+
private StringUtil() {
9+
throw new UnsupportedOperationException();
10+
}
11+
}

0 commit comments

Comments
 (0)