public static String remove(String str, char remove) {
        if (isEmpty(str) || str.indexOf(remove) == INDEX_NOT_FOUND) {
            return str;
        }
        char[] chars = str.toCharArray();
        int pos = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] != remove) {
                chars[pos++] = chars[i];
            }
        }
        return new String(chars, 0, pos);
    }
<p>Removes all occurrences of a character from within the source string.</p>

<p>A {@code null} source string will return {@code null}.
An empty ("") source string will return the empty string.</p>

<pre>
StringUtils.remove(null, *)       = null
StringUtils.remove("", *)         = ""
StringUtils.remove("queued", 'u') = "qeed"
StringUtils.remove("queued", 'z') = "queued"
</pre>

@param str  the source String to search, may be null
@param remove  the char to search for and remove, may be null
@return the substring with the char removed if found,
 {@code null} if null String input
@since 2.1
android/android_framework/base/src/main/java/lang3/StringUtils.java