String dequote(String str) {
    if (str == null) {
      return null;
    }
    while ((str.startsWith("'") && str.endsWith("'"))
        || (str.startsWith("\"") && str.endsWith("\""))) {
      str = str.substring(1, str.length() - 1);
    }
    return str;
  }
Split the line into an array by tokenizing on space characters

@param line
         the line to break up
@return an array of individual words
beeline/src/java/org/apache/hive/beeline/BeeLine.java