Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# StringDict Class

Namespace: id3.Document

## Definition

Represents a string dictionary.
Python

    class StringDict

Dart

    class StringDict implements Finalizable

C#

    public partial class StringDict

Java

    public class StringDict implements AutoCloseable, Serializable

Swift

    public class StringDict

C

    typedef struct id3DocumentStringDict *ID3_DOCUMENT_STRING_DICT;

## Usage

Python

    stringDictInstance = StringDict()
    # ...

Explicit destruction

    # ...
    del stringDictInstance

Dart

    final stringDictInstance = sdk.StringDict();
    // ...

Explicit destruction

    // ...
    stringDictInstance.dispose()

C#

    using (var stringDictInstance = new StringDict())
    {
       // ...
    }

Explicit destruction

    var stringDictInstance = new StringDict()
    // ...
    stringDictInstance.Dispose()

Java

    try (StringDict stringDictInstance = new StringDict()) {
    // ...
    }

Explicit destruction

    StringDict stringDictInstance = new StringDict();
    // ...
    stringDictInstance.close();

Swift

    private var stringDictInstance: StringDict? = nil
    stringDictInstance = try StringDict()

C

    ID3_DOCUMENT_STRING_DICT hStringDict{};
    int err = id3DocumentStringDict_Initialize(&hStringDict);
    if (err == ID3_SUCCESS) {
        // ...
        id3DocumentStringDict_Dispose(&hStringDict);
    }

## Properties

Name | Type | Description
--- | --- | ---
count | int | Gets the number of elements contained in the dict
keys | StringList | Gets a string list containing the keys in the dict.
operator [string key] | string | Gets or sets the element for the key in the dict.

## Iteration

This class supports iteration in Dart, C#, Java and Python.

The iteration is done on keys

## Methods

Name | Description
--- | ---
add | Adds an item to the StringDict object.
clear | Clears the StringDict object.
clone | Clones the StringDict object.
containsKey | Determines whether the StringDictobject contains the specified key.
get | Gets an item of the StringDict object.
getCount | Gets the number of elements in the StringDict object.
remove | Removes an element of the StringDict object.
set | Sets an item of the StringDict object.