class StringUtilities {

	public static String trim(String original, int max) {
		int minimum = ELLIPSES.length() + 1; // +1 for at least one char
		if (max < minimum) {
			throw new IllegalArgumentException("Max cannot be less than " + minimum);
		}

		if (original.length() > max) {
			return original.substring(0, max - 3) + ELLIPSES;
		}
		return original;
	}

	private  StringUtilities();

}