Removes all occurrences of a <code>char</code> from a <code>String</code>

@deprecated  this method is slow and no longer supported
332320
@Deprecated
	public static String removeChars(String S, char ch) {
		int pos;
		while((pos=S.indexOf(ch))!=-1) S=S.substring(0,pos)+S.substring(pos+1);
		return S;
	}
1300272
static String removeExtraneousSlashes(String s) {
    int lastNonSlash = NON_SLASH_MATCHER.lastIndexIn(s);
    if (lastNonSlash != -1) {
      s = s.substring(0, lastNonSlash + 1);
    }

    return SLASH_MATCHER.collapseFrom(s, '/');
  }
1004834
@Override
	protected int pruneCache() {
		int count = 0;
		CacheObj<K, V> first = null;
		
		// 清理过期对象并找出链表头部元素（先入元素）
		Iterator<CacheObj<K, V>> values = cacheMap.values().iterator();
		while (values.hasNext()) {
			CacheObj<K, V> co = values.next();
			if (co.isExpired()) {
				values.remove();
				count++;
			}
			if (first == null) {
				first = co;
			}
		}

		// 清理结束后依旧是满的，则删除第一个被缓存的对象
		if (isFull() && null != first) {
			cacheMap.remove(first.key);
			onRemove(first.key, first.obj);
			count++;
		}
		return count;
	}
270638
def delete_char(self, e): # (C-d)
        """
        self.l_buffer.delete_char(self.argument_reset)
        self.finalize()
1291290
public static String delAll(Pattern pattern, CharSequence content) {
		if (null == pattern || StrUtil.isBlank(content)) {
			return StrUtil.str(content);
		}

		return pattern.matcher(content).replaceAll(StrUtil.EMPTY);
	}
1143170
public static Optional<String> trimStart(final String input, String... chars) {
        return Optional.ofNullable(input).filter(v -> !v.isEmpty()).map(v -> {
            String pattern = String.format("^[%s]+", join(chars, "\\"));
            return v.replaceAll(pattern, "");
        });
    }
672798
@SafeVarargs
    public static char[] removeAll(final char[] a, final char... elements) {
        if (N.isNullOrEmpty(a)) {
            return N.EMPTY_CHAR_ARRAY;
        } else if (N.isNullOrEmpty(elements)) {
            return a.clone();
        } else if (elements.length == 1) {
            return removeAllOccurrences(a, elements[0]);
        }

        final CharList list = CharList.of(a.clone());
        list.removeAll(CharList.of(elements));
        return list.trimToSize().array();
    }
87669
private static String cleanString(String str)
    {
	String result = str;
	result = result.replace("\r", "");
	result = result.replace("\n", "");
	result = result.replace("\t", "");

	return result;
    }
450989
function trimStringEnds(keyValueString, unwantedCharArray) {
    var unwantedBegCharIndex = 0;
    var unwantedEndCharIndex = keyValueString.length - 1;
    var charIsUnwanted;
    var keepGoing = true; //keep traversing the string
    //starting from the beginning of the string
    while (keepGoing) {
        charIsUnwanted = false;
        for (var x = 0; x < unwantedCharArray.length; x++) {
            if (keyValueString.charAt(unwantedBegCharIndex) === unwantedCharArray[x]) {
                charIsUnwanted = true;
            }
        }
        if (!charIsUnwanted) {
            keepGoing = false;
        } else {
            unwantedBegCharIndex++;
        }
    }
    //now start at the end
    keepGoing = true;
    while (keepGoing) {
        charIsUnwanted = false;
        for (var y = 0; y < unwantedCharArray.length; y++) {
            if (keyValueString.charAt(unwantedEndCharIndex) === unwantedCharArray[y]) {
                charIsUnwanted = true;
            }
        }
        if (!charIsUnwanted) {
            keepGoing = false;
        } else {
            unwantedEndCharIndex--;
        }
    }
    keyValueString = keyValueString.slice(unwantedBegCharIndex, unwantedEndCharIndex + 1);
    return keyValueString;
}
948703
@Override
    public FastStr replace(char oldChar, char newChar) {
        if (oldChar != newChar) {
            char[] val = this.buf; /* avoid getfield opcode */
            int len = length();
            int i = begin - 1;

            while (++i < end) {
                if (val[i] == oldChar) {
                    break;
                }
            }
            if (i < end) {
                char buf[] = new char[len];
                for (int j = begin; j < i; j++) {
                    buf[j - begin] = val[j];
                }
                while (i < end) {
                    char c = val[i];
                    buf[i - begin] = (c == oldChar) ? newChar : c;
                    i++;
                }
                return new FastStr(buf, 0, len);
            }
        }
        return this;
    }
1129543
@Deprecated
    public static String select(String string, CharPredicate predicate)
    {
        return StringIterate.selectChar(string, predicate);
    }
575555
public static String unCamelify(CharSequence original) {
		StringBuilder result = new StringBuilder(original.length());
		boolean wasLowercase = false;
		for (int i = 0; i < original.length(); i++) {
			char ch = original.charAt(i);
			if (Character.isUpperCase(ch) && wasLowercase) {
				result.append('-');
			}
			wasLowercase = Character.isLowerCase(ch);
			result.append(Character.toLowerCase(ch));
		}
		return result.toString();
	}
224197
@Deprecated
    public long[] internalGetCEs(CharSequence str) {
        CollationBuffer buffer = null;
        try {
            buffer = getCollationBuffer();
            boolean numeric = settings.readOnly().isNumeric();
            CollationIterator iter;
            if(settings.readOnly().dontCheckFCD()) {
                buffer.leftUTF16CollIter.setText(numeric, str, 0);
                iter = buffer.leftUTF16CollIter;
            } else {
                buffer.leftFCDUTF16Iter.setText(numeric, str, 0);
                iter = buffer.leftFCDUTF16Iter;
            }
            int length = iter.fetchCEs() - 1;
            assert length >= 0 && iter.getCE(length) == Collation.NO_CE;
            long[] ces = new long[length];
            System.arraycopy(iter.getCEs(), 0, ces, 0, length);
            return ces;
        } finally {
            releaseCollationBuffer(buffer);
        }
    }
10210
@Deprecated @ReplacedBy(value="java.lang.String.replace()", reason="since 1.5")
    public static String replace (String source, String before, String after)
    {
        int pos = source.indexOf(before);
        if (pos == -1) {
            return source;
        }

        StringBuilder sb = new StringBuilder(source.length() + 32);

        int blength = before.length();
        int start = 0;
        while (pos != -1) {
            sb.append(source.substring(start, pos));
            sb.append(after);
            start = pos + blength;
            pos = source.indexOf(before, start);
        }
        sb.append(source.substring(start));

        return sb.toString();
    }
356679
@Deprecated
    public static void forEach(String string, CharProcedure procedure)
    {
        StringIterate.forEachChar(string, procedure);
    }
75477
private String unescape(String input, char c) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "unescape", new Object[]{input, c});

    String result = input;
    // if there are no instances of c in the String we can just return the original
    if (input.indexOf(c) != -1) {
      int startValue = 0;
      StringBuffer temp = new StringBuffer(input);
      String cStr = new String(new char[] { c });
      while ((startValue = temp.indexOf(cStr, startValue)) != -1) {
        if (startValue > 0 && temp.charAt(startValue - 1) == '\\') {
          // remove the preceding slash to leave the escaped character
          temp.deleteCharAt(startValue - 1);
        }
        else {
          startValue++;
        }
      }
      result = temp.toString();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "unescape",  result);
    return result;
  }
636358
public static String replaceBadChars(String string) {
        return string.replace(' ', '_').replace(',', '_').replace('.', '_')
                .replace('-', '_').trim().replace("\n", "").replace("?", "Int").replace("!", "Exc").replace("ñ", "gn");
    }