docs: public static List<String> splitAsList(String source, char delimiter, boolean trim) {
  
          List<String> result = new ArrayList<String>();
          int i = 0;
          int l = source.length();
          int n = source.indexOf(delimiter);
          while (n != -1) {
              // zero - length items are not seen as tokens at start or end
              if ((i < n) || ((i > 0) && (i < l))) {
                  result.add(trim ? source.substring(i, n).trim() : source.substring(i, n));
              }
              i = n + 1;
              n = source.indexOf(delimiter, i);
          }
          // is there a non - empty String to cut from the tail?
          if (n < 0) {
              n = source.length();
          }
          if (i < n) {
              result.add(trim ? source.substring(i).trim() : source.substring(i));
          }
          return result;
      }