class StringUtilities {

    public static String pad(String str, int desiredLength)
    {
        final StringBuilder builder = new StringBuilder(desiredLength);
        if (str != null)
        {
            builder.append(str);
        }
        final int padCount = str == null ? desiredLength : desiredLength - str.length();
        for (int i = 0; i < padCount; i++)
        {
            builder.append(' ');
        }
        return builder.toString();
    }

    private  StringUtilities();

}