/** * Removes all the occurrences of the \<toRemove> characters from the <string> * * @param string the string from which to remove the characters * @param toRemove the \character to remove from the <string> * @return a new string with the removed \<toRemove> characters */ @NotNull public static String removeEscapedChars(@NotNull final String string, final char[] toRemove) { String toReturn = string; for (char character : toRemove) { toReturn = removeEscapedChar(toReturn, character); } return toReturn; } }
/** * Removes all the occurrences of the \<toRemove> characters from the <string> * * @param string the string from which to remove the characters * @param toRemove the \character to remove from the <string> * @return a new string with the removed \<toRemove> characters */ @NotNull public static String removeEscapedChars(@NotNull final String string, final char[] toRemove) { String toReturn = string; for (char character : toRemove) { toReturn = removeEscapedChar(toReturn, character); } return toReturn; } }