public static String format(String multiLanguageText) {
        if (multiLanguageText.isEmpty()) {
            return multiLanguageText;
        }
        if (Character.isDigit(multiLanguageText.charAt(multiLanguageText.length() - 1))) {
            for (int i = multiLanguageText.length(); i > 0; i--) {
                if (!Character.isDigit(multiLanguageText.charAt(i - 1))) {
                    if (!Character.isLowerCase(multiLanguageText.charAt(i - 1))) {
                        break;
                    }
                    multiLanguageText = multiLanguageText.substring(0, i) + " " + multiLanguageText.substring(i);
                    break;
                }
            }
        }
        return StringProcessor.formatHumanReadable(multiLanguageText);
    }
public static String format ( String multiLanguageText ) { if ( multiLanguageText . isEmpty ( ) ) { return multiLanguageText ; } if ( Character . isDigit ( multiLanguageText . charAt ( multiLanguageText . length ( ) - 1 ) ) ) { for ( int i = multiLanguageText . length ( ) ; i > 0 ; i -- ) { if ( ! Character . isDigit ( multiLanguageText . charAt ( i - 1 ) ) ) { if ( ! Character . isLowerCase ( multiLanguageText . charAt ( i - 1 ) ) ) { break ; } multiLanguageText = multiLanguageText . substring ( 0 , i ) + " " + multiLanguageText . substring ( i ) ; break ; } } } return StringProcessor . formatHumanReadable ( multiLanguageText ) ; }
Format the given multiLanguageText by removing duplicated white spaces, underscores and camel cases.

@param multiLanguageText the multiLanguageText to format.

@return the formatted multiLanguageText.