Trim a string to a length, then append ... at the end if it extends the limit @param s the string @param l the limit @return the modified string
(String s, int l)
| 929 | * @return the modified string |
| 930 | */ |
| 931 | public static String trim(String s, int l) { |
| 932 | if (s.length() <= l) { |
| 933 | return s; |
| 934 | } |
| 935 | |
| 936 | return s.substring(0, l) + "..."; |
| 937 | } |
| 938 | |
| 939 | /** |
| 940 | * Get a class name into a configuration/filename key For example, |
no test coverage detected