.. index:: 
  !StringList.set Method
  
.. _id3_document_string_list_set_class_method:

===============================================================================
StringList.set Method
===============================================================================

Module: :ref:`StringList<id3_document_string_list_class>`

Definition
----------

Sets an item of the StringList object.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        set(self, index: int, item: str) -> None

      **Parameters**

        .. line-block::

          ``index`` int
          :guilabel:`in` Index of the  item to set.

          ``item`` str
          :guilabel:`in`  item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        void set(int index, String? item)

      **Parameters**

        .. line-block::

          ``index`` int
          :guilabel:`in` Index of the  item to set.

          ``item`` String
          :guilabel:`in`  item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public void Set(int index, string item)

      **Parameters**

        .. line-block::

          ``index`` int
          :guilabel:`in` Index of the  item to set.

          ``item`` string
          :guilabel:`in`  item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public void set(int index, String item) throws DocumentException

      **Parameters**

        .. line-block::

          ``index`` int
          :guilabel:`in` Index of the  item to set.

          ``item`` String
          :guilabel:`in`  item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public func set(index: Int32, item: String) throws

      **Parameters**

        .. line-block::

          ``index`` Int32
          :guilabel:`in` Index of the  item to set.

          ``item`` String
          :guilabel:`in`  item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3DocumentStringList_Set (
            ID3_DOCUMENT_STRING_LIST hStringList, 
            int index, 
            const char * item)

      **Parameters**

        .. line-block::

          ``hStringList`` :ref:`ID3_DOCUMENT_STRING_LIST<id3_document_string_list_class>`
          :guilabel:`in` Handle to the StringList object.

          ``index`` int
          :guilabel:`in` Index of the  item to set.

          ``item`` const char *
          :guilabel:`in`  item to set.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3DocumentError<id3_document_document_error_enum>` file for the list of possible error codes.


