package org.apache.logging.log4j.util;

/**
 * <em>Consider this class private.</em>
 */
public class Strings {

    /**
     * The empty string.
     */
    public static final String EMPTY = "";

    /**
     * <p>Checks if a CharSequence is empty ("") or null.</p>
     *
     * <pre>
     * Strings.isEmpty(null)      = true
     * Strings.isEmpty("")        = true
     * Strings.isEmpty(" ")       = false
     * Strings.isEmpty("bob")     = false
     * Strings.isEmpty("  bob  ") = false
     * </pre>
     *
     * <p>NOTE: This method changed in Lang version 2.0.
     * It no longer trims the CharSequence.
     * That functionality is available in isBlank().</p>
     *
     * <p>Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isEmpty(CharSequence)</p>
     *
     * @param cs  the CharSequence to check, may be null
     * @return {@code true} if the CharSequence is empty or null
     */
    public static boolean isEmpty(final CharSequence cs) {
        return cs == null || cs.length() == 0;
    }

    /**
     * <p>Checks if a CharSequence is not empty ("") and not null.</p>
     *
     * <pre>
     * StringUtils.isNotEmpty(null)      = false
     * StringUtils.isNotEmpty("")        = false
     * StringUtils.isNotEmpty(" ")       = true
     * StringUtils.isNotEmpty("bob")     = true
     * StringUtils.isNotEmpty("  bob  ") = true
     * </pre>
     *
     * <p>Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isNotEmpty(CharSequence)</p>
     *
     * @param cs  the CharSequence to check, may be null
     * @return {@code true} if the CharSequence is not empty and not null
     * @since 3.0 Changed signature from isNotEmpty(String) to isNotEmpty(CharSequence)
     */
    public static boolean isNotEmpty(final CharSequence cs) {
        return !isEmpty(cs);
    }
}

@@ -89,16 +89,22 @@
 %0Apublic 
+final 
 class St
@@ -111,16 +111,16 @@
 rings %7B%0A
-
 %0A    /**
@@ -197,16 +197,47 @@
  = %22%22;%0A%0A
+    private Strings() %7B%0A    %7D%0A%0A
     /**%0A
@@ -1171,36 +1171,32 @@
 e%3E%0A     * String
-Util
 s.isNotEmpty(nul
@@ -1216,36 +1216,32 @@
 se%0A     * String
-Util
 s.isNotEmpty(%22%22)
@@ -1261,36 +1261,32 @@
 se%0A     * String
-Util
 s.isNotEmpty(%22 %22
@@ -1305,36 +1305,32 @@
 ue%0A     * String
-Util
 s.isNotEmpty(%22bo
@@ -1353,28 +1353,24 @@
     * String
-Util
 s.isNotEmpty
@@ -1659,96 +1659,8 @@
 ull%0A
-     * @since 3.0 Changed signature from isNotEmpty(String) to isNotEmpty(CharSequence)%0A
     
@@ -1754,16 +1754,1067 @@
 ty(cs);%0A
-
     %7D%0A
+%0A    /**%0A     * %3Cp%3ERemoves control characters (char &lt;= 32) from both%0A     * ends of this String returning %7B@code null%7D if the String is%0A     * empty (%22%22) after the trim or if it is %7B@code null%7D.%0A     *%0A     * %3Cp%3EThe String is trimmed using %7B@link String#trim()%7D.%0A     * Trim removes start and end characters &lt;= 32.%3C/p%3E%0A     *%0A     * %3Cpre%3E%0A     * Strings.trimToNull(null)          = null%0A     * Strings.trimToNull(%22%22)            = null%0A     * Strings.trimToNull(%22     %22)       = null%0A     * Strings.trimToNull(%22abc%22)         = %22abc%22%0A     * Strings.trimToNull(%22    abc    %22) = %22abc%22%0A     * %3C/pre%3E%0A     *%0A     * %3Cp%3ECopied from Apache Commons Lang org.apache.commons.lang3.StringUtils.trimToNull(String)%3C/p%3E%0A     *%0A     * @param str  the String to be trimmed, may be null%0A     * @return the trimmed String,%0A     *  %7B@code null%7D if only chars &lt;= 32, empty or null String input%0A     */%0A    public static String trimToNull(final String str) %7B%0A        final String ts = str == null ? null : str.trim();%0A        return isEmpty(ts) ? null : ts;%0A    %7D%0A%0A
 %7D%0A

Add trimToNull to Strings utility class.