public static String getPad(@NonNull final String padPattern, final int targetLength) {
        //fast-lane
        if (targetLength < padPattern.length()) {
            return padPattern.substring(0, targetLength);
        }
        //long-lane
        if (padPattern.isEmpty()) {
            return "";
        }
        final StringBuilder sb = new StringBuilder();
        for (int i = 0; i < targetLength / padPattern.length(); i++) {
            sb.append(padPattern);
        }
        sb.append(padPattern.substring(0, targetLength % padPattern.length()));
        return sb.toString();
    }
creates a pad of length 'targetLength' out of given 'padPattern'.
if 'padPattern' is too short to fill 'targetLength' then it is concattenated to fill the length up
main/src/main/java/cgeo/geocaching/utils/TextUtils.java