code: static String parsePrefix(String key) {
          if (key == null)
              return null;
  
          boolean inquotes = false;
  
          for (int i = 0; i < key.length(); i++) {
              char c = key.charAt(i);
  
              if (c == '"') {
                  inquotes = !inquotes;
              } else if ((c == '[' || c == '.') && !inquotes) {
                  return key.substring(0, i);
              }
          }
  
          return null;
      }
docs: Internal method to parse a style prefix.
  
  @param  key the key to parse.
  
  @return the prefix portion of the key.