.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEChem

.. oe:function:: OEStringToPolymerType

   .. attention::

      |PRELIMINARY-API|

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

      .. oe:api::

         unsigned OEStringToPolymerType(const std::string &)

   .. oe:language:: python

      .. oe:api:: python

         OEStringToPolymerType(arg1: str) -> int

   Converts a string into a constant in the :oe:constns:`OEChem::OEPolymerType` namespace.
   Returns :oe:const:`OEChem::OEPolymerType::Undefined`, if the string
   does not represent any of the specific polymer types.

   .. seealso::

      * :oe:constns:`OEChem::OEPolymerType` namespace
      * :oe:func:`OEChem::OEPolymerTypeToString` function
