Here you can find the source of getTailorString(String string, int length)
public static String getTailorString(String string, int length)
//package com.java2s; public class Main { public static String getTailorString(String string, int length) { if (string == null) { return null; }//from w w w .j a va 2 s .c om if (string.length() <= length) return string; StringBuilder sb = new StringBuilder( string.substring(0, length - 1)); sb.append("."); sb.append("."); sb.append("."); return sb.toString(); } }