public static String upperCase(final String str, final Locale locale) {
        if (str == null) {
            return null;
        }
        return str.toUpperCase(locale);
    }
public static String upperCase ( final String str , final Locale locale ) { if ( str == null ) { return null ; } return str . toUpperCase ( locale ) ; }
<p>Converts a String to upper case as per {@link String#toUpperCase(Locale)}.</p>

<p>A {@code null} input String returns {@code null}.</p>

<pre>
StringUtils.upperCase(null, Locale.ENGLISH)  = null
StringUtils.upperCase("", Locale.ENGLISH)    = ""
StringUtils.upperCase("aBc", Locale.ENGLISH) = "ABC"
</pre>

@param str  the String to upper case, may be null
@param locale  the locale that defines the case transformation rules, must not be null
@return the upper cased String, {@code null} if null String input
@since 2.5