code: public static String getIndent(String line) {
          if (line == null || line.length() == 0) {
              return "";
          }
          int i = 0;
          while (i < line.length() && line.charAt(i) == '\t') {
              i++;
          }
          return line.substring(0, i);
      }
docs: Get the indentation of a line of text.
  This is the subString from
  beginning of line to the first non-space char
  
  @param line the line of text
  @return indentation of line.