public static String prefix(final String string, final char prefixChar, final int count) {
        final StringBuilder stringBuilder = new StringBuilder();

        //noinspection StringRepeatCanBeUsed
        for (int i = 0; i < count; i++) {
            stringBuilder.append(prefixChar);
        }
        if (string != null) {
            stringBuilder.append(string);
        }
        return stringBuilder.toString();
    }
@return obj.toString() or an empty string if obj is null.
stroom-util-shared/src/main/java/stroom/util/shared/StringUtil.java