code: protected String getKey(String str) {
          int index = str.indexOf('=');
          String key = null;
          if (index > 0) {
              key = str.substring(0, index).trim();
              if (key.charAt(key.length() - 1) == ':') {
                  key = key.substring(0, key.length() - 1).trim();
              }
          }
          return key;
      }
docs: returns the key value of key = value, or key := value pair.