.. include:: ../substitutions

.. oe:namespace:: OEDepict

.. _OEDepict_OEIsValidSVGGroupId:


.. oe:function:: OEIsValidSVGGroupId


   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEIsValidSVGGroupId(const std::string& id)

   .. oe:language:: python

      .. oe:api:: python

         OEIsValidSVGGroupId(id: str) -> bool

   Returns whether the given string can be used as an SVG group identifier.

   The rules of **valid** SVG group ids (:ref:`OESVGClass <OEDepict_OESVGClass>`)
   in **OEDepict TK** are:

   * It must start with an alphabetic character.
   * It must not contain any space characters.
   * It may contain alphanumeric character and ``-`` (hyphen), ``_``
     (underscore), ``;`` (semi-colon) or ``.`` (period).
   * The size of the SVG group id should not exceed ``64`` characters.

   .. note::

      The group id must be **unique** amongst all the ids in the
      document. This condition is not checked by the
      :oe:func:`OEDepict::OEIsValidSVGGroupId` function.
