Java Utililty Methods String Remove

List of utility methods to do String Remove

Description

The list of methods to do String Remove are organized into topic(s).

Method

ObjectremoveField(BSONObject b, String fieldName)
remove Field
if (fieldName.contains("."))
    throw new UnsupportedOperationException("not yet implemented");
return b.removeField(fieldName);
StringremoveFillers(String str)
remove Fillers
String delim = getDelimiters();
return removeFillers(str, delim);
voidremoveFromSearchPath(String _path)
remove From Search Path
String path = _path.codePointAt(_path.length() - 1) != '/' ? _path + "/" : _path;
if (searchPaths.contains(path))
    searchPaths.remove(path);
StringremoveGender(String pos)
remove Gender
if (pos.startsWith("art")) {
    pos = "art";
} else if ("nm".equals(pos) || "nf".equals(pos) || "nn".equals(pos)) {
    pos = "n";
return pos;
StringremoveGenericQuote(String str)
Transform a string from "java.util.List<String>" to "java.util.List"
if (str == null) {
    return null;
if (str.charAt(str.length() - 1) == '>') {
    int lt = str.lastIndexOf('<');
    return str.substring(0, lt);
return str;
...
StringremoveIllegalXMLChars(String in)
Remove illegal characters like 0x11 (vertical tab) and others that are not allowed in xml from the input string.
if (in == null) {
    return null;
StringBuilder out = new StringBuilder(in.length());
for (int i = 0; i < in.length(); i++) {
    char c = in.charAt(i);
    if (c < 0x20) { 
        Character val = Character.valueOf(in.charAt(i));
...
voidremoveImportClass(String className)
remove Import Class
importedClass.remove(className);
voidremoveKeyPrefix(Properties properties, String prefix)
Removes entries which have the specified prefix in their key.
if (properties == null) {
    throw new IllegalArgumentException("properties must not be null"); 
if (prefix == null) {
    throw new IllegalArgumentException("prefix must not be null"); 
for (Iterator<?> iter = properties.keySet().iterator(); iter.hasNext();) {
    Object key = iter.next();
...
StringremoveModuleReference(String allStr, String refStr)
Removes reference from RefSource and returns the new references.
ArrayList<String> orgList = null;
if (allStr != null) {
    orgList = new ArrayList<String>(Arrays.asList(allStr.split(REFERENCE_SEPARATOR_NAME)));
} else {
    orgList = new ArrayList<String>();
if (orgList.contains(refStr)) {
    orgList.remove(refStr);
...
StringremoveNewLineAndTab(String value)
If there exists reserved characters in value, remove them all.
if (value != null) {
    value = value.trim();
    List<String> reserveCharList = new ArrayList<String>();
    reserveCharList.add("\n");
    reserveCharList.add("\t");
    for (String c : reserveCharList) {
        value = value.replaceAll(c, " ");
return value;