Implements

Constructors

  • Create a WideStringArray instance. Instead of creating an instance in new mode, use create to create an instance.

    Parameters

    • options: Options

      Create a WideStringArray instance with the specified options.

    Returns WideStringArray

    const wideStringArr = await WideStringArray.create();
    

Properties

options: Options

Methods

  • Adds an element to the WideStringArray.

    Parameters

    • newItem: string

      The element to add.

    Returns Promise<void>

    A promise that resolves when the element is added.

  • Copies elements from a source WideStringArray.

    Parameters

    • srcArr: WideStringArrayType

      The source array to copy from.

    • start: number

      The starting position in the source array.

    • count: number

      The number of elements to copy.

    Returns Promise<number>

    A promise that resolves to the number of elements copied or -1 if an error occurs.

  • Destroys the WideStringArray.

    Returns Promise<void>

    A promise that resolves when the WideStringArray is destroyed.

  • Retrieves an element at a specific index in the WideStringArray.

    Parameters

    • index: number

      The index of the element to retrieve.

    Returns Promise<string>

    A promise that resolves to the string element at the specified index.

  • Retrieves the number of elements in the WideStringArray.

    Returns Promise<number>

    A promise that resolves to the number of elements in the array.

  • Removes all elements from the WideStringArray.

    Returns Promise<void>

    A promise that resolves when all elements are removed.

  • Removes an element at a specific index in the WideStringArray.

    Parameters

    • index: number

      The index of the element to remove.

    Returns Promise<void>

    A promise that resolves when the element is removed.

  • Creates a WideStringArray instance.

    Parameters

    • Optionaloptions: Options

      The configuration options required for creation, containing necessary initialization information.

    Returns Promise<WideStringArrayType>

    A promise that resolves to a WideStringArray instance.