private static String spacesForString(String s) {
    if (s == null || s.length() == 0) {
      return "";
    }
    return String.format("%1$-" + s.length() +"s", "");
  }
Generate a string of whitespace the same length as the parameter

@param s String for which to generate equivalent whitespace
@return  Whitespace
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java