class StringUtilities {

    public static String cut(String s, int length)
    {
        if (s == null)
        {
            return null;
        }
        final String end = "...";
        return s.length() <= length ? s : s.substring(0, Math.max(length - end.length(), 0)) + end;
    }

    private  StringUtilities();

}