docs: public static WebSocketExtension parse(String string)
      {
          if (string == null)
          {
              return null;
          }
  
          // Split the string by semi-colons.
          String[] elements = string.trim().split("\\s*;\\s*");
  
          if (elements.length == 0)
          {
              // Even an extension name is not included.
              return null;
          }
  
          // The first element is the extension name.
          String name = elements[0];
  
          if (Token.isValid(name) == false)
          {
              // The extension name is not a valid token.
              return null;
          }
  
          // Create an instance for the extension name.
          WebSocketExtension extension = createInstance(name);
  
          // For each "{key}[={value}]".
          for (int i = 1; i < elements.length; ++i)
          {
              // Split by '=' to get the key and the value.
              String[] pair = elements[i].split("\\s*=\\s*", 2);
  
              // If {key} is not contained.
              if (pair.length == 0 || pair[0].length() == 0)
              {
                  // Ignore.
                  continue;
              }
  
              // The name of the parameter.
              String key = pair[0];
  
              if (Token.isValid(key) == false)
              {
                  // The parameter name is not a valid token.
                  // Ignore this parameter.
                  continue;
              }
  
              // The value of the parameter.
              String value = extractValue(pair);
  
              if (value != null)
              {
                  if (Token.isValid(value) == false)
                  {
                      // The parameter value is not a valid token.
                      // Ignore this parameter.
                      continue;
                  }
              }
  
              // Add the pair of the key and the value.
              extension.setParameter(key, value);
          }
  
          return extension;
      }