code: public static String[] splitByComma(String input, boolean allowEmpty) {
          if (input == null) {
              return null;
          }
          String[] splitWithEmptyValues = trim(input).split("\\s*,\\s*", -1);
          return allowEmpty ? splitWithEmptyValues : subtraction(splitWithEmptyValues, new String[]{""});
      }
docs: Splits String value with comma "," used as a separator. The whitespaces around values are trimmed.
  
  @param input string to split
  @return {@code null} if provided value was {@code null}, split parts otherwise (trimmed)