Class StringRemove

java.lang.Object
com.helger.base.string.StringRemove

@Immutable public final class StringRemove extends Object
  • Method Details

    • removeAll

      @Nullable public static String removeAll(@Nullable String sInputString, char cRemoveChar)
      Remove all occurrences of the passed character from the specified input string
      Parameters:
      sInputString - The input string where the character should be removed. If this parameter is null or empty, no removing is done.
      cRemoveChar - The character to be removed.
      Returns:
      The input string as is, if the input string is empty or if the remove char is not contained.
    • removeAll

      @Nullable public static String removeAll(@Nullable String sInputString, @Nullable String sRemoveString)
      Remove all occurrences of the passed character from the specified input string
      Parameters:
      sInputString - The input string where the character should be removed. If this parameter is null or empty, no removing is done.
      sRemoveString - The String to be removed. May be null or empty in which case nothing happens.
      Returns:
      The input string as is, if the input string is empty or if the remove string is empty or not contained.
    • removeMultiple

      @Nonnull public static String removeMultiple(@Nullable String sInputString, @Nonnull char[] aRemoveChars)
      Optimized remove method that removes a set of characters from an input string!
      Parameters:
      sInputString - The input string.
      aRemoveChars - The characters to remove. May not be null.
      Returns:
      The version of the string without the passed characters or an empty String if the input string was null.