code: public static String[] splitAsArray(String pArg, String pEscape, String pDelimiter) {
          if (pArg != null) {
              List<String> elements = split(pArg, pEscape, pDelimiter);
              return elements.toArray(new String[elements.size()]);
          } else {
              return new String[0];
          }
      }
docs: Split but return an array which is never null (but might be empty)
  
  @param pArg argument to split
  @param pEscape single character used for escaping
  @param pDelimiter delimiter to use
  @return the splitted string as list or an empty array if the argument was null