public static String elide(String original, int max, String suffix)
original
string and append the given suffix
if it is longest than the
defined max
length minus the length of the suffix
.
The returned String length will always be in Math.min(original.length, max)
.
original
- the original string to elide if necessary.max
- the maximum length of the returned string.suffix
- the suffix to append in case the original String is too long.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.