.. include:: ../substitutions

.. oe:namespace:: OEDepict

.. _OEDepict_OEIsValidSVGClassName:


.. oe:function:: OEIsValidSVGClassName

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

      .. oe:api::

         bool OEIsValidSVGClassName(const std::string& name)

   .. oe:language:: python

      .. oe:api:: python

         OEIsValidSVGClassName(name: str) -> bool

   Returns whether the given string can be used as an SVG class name.

   The rules of **valid** SVG classes names (: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 any alphanumeric characters, ``-`` (hyphen) and
     ``_`` (underscore).
   * The size of the SVG class name should not exceed ``64`` characters.

   .. note::

      SVG class names starting with ``oedepict`` are reserved by
      **OEDepict TK** for internal usage.
