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

# StringDict.containsKey Method

Module: StringDict

## Definition

Determines whether the StringDictobject contains the specified key.

Python

    contains_key(self, key: str) -> bool

Parameters

> `key` str
> in The key to locate in the object.

Returns

> `bool`
> true if the object contains an element with the specified key, otherwise false.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    bool containsKey(String? key)

Parameters

> `key` String
> in The key to locate in the object.

Returns

> `bool`
> true if the object contains an element with the specified key, otherwise false.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public bool ContainsKey(string key)

Parameters

> `key` string
> in The key to locate in the object.

Returns

> `bool`
> true if the object contains an element with the specified key, otherwise false.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public boolean containsKey(String key) throws DocumentException

Parameters

> `key` String
> in The key to locate in the object.

Returns

> `boolean`
> true if the object contains an element with the specified key, otherwise false.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public func containsKey(key: String) throws -> Bool

Parameters

> `key` String
> in The key to locate in the object.

Returns

> `Bool`
> true if the object contains an element with the specified key, otherwise false.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentStringDict_ContainsKey (
        ID3_DOCUMENT_STRING_DICT hStringDict,
        const char * key,
        bool * result)

Parameters

> `hStringDict` ID3_DOCUMENT_STRING_DICT
> in Handle to the StringDict object.
> `key` const char *
> in The key to locate in the object.
> `result` bool *
> out true if the object contains an element with the specified key, otherwise false.

Returns

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