code: private int findIndex(String line) {
  
          int index = -1;
  
          if (line == null) {
              return index;
          }
  
          String trimmedLine = line.trim();
          int spaceIndex = trimmedLine.indexOf(" ");
          int tabIndex = trimmedLine.indexOf("\t");
  
          if (spaceIndex != -1) {
              if (tabIndex != -1) {
                  if (spaceIndex < tabIndex) {
                      index = spaceIndex;
                  } else {
                      index = tabIndex;
                  }
              } else {
                  index = spaceIndex;
              }
          } else {
              index = tabIndex;
          }
          return index;
      }
docs: find first space or tab as separator.