code: public static String extractKeyHead(String key, String delimeter)
      {
          int index = key.indexOf(delimeter);
          if (index == -1)
          {
              return key;
          }
  
          String result = key.substring(0, index);
          return result;
      }
docs: Extract the value of keyHead.
  
  @param key is used to get string.
  @param delimeter key delimeter
  @return the  value of keyHead .