code: public static int[][] fieldsFromWidths (int... widths) {
          int[][] fields = new int[widths.length][2];
          int start = 0;
          for (int i = 0; i < widths.length; ++i) {
              fields[i][0] = start;
              start = (fields[i][1] = start + widths[i]);
          }
          return fields;
      }
docs: this method returns a field description array given a set of widths (assuming there are no
  pads in the intended string)
  @param widths an array of numbers indicating the width of each field
  @return a two dimensional array of start and end positions for tokens