NEW

Connect the world's APIs to Web3 with Chainlink Functions. Get started

Length Task

Returns the length of a byte array or string.

Parameters

  • input: Byte array, or string to get the length for.

Outputs

The length of the byte array or string.

Note: For strings containing multi-byte unicode characters, the output is the length in bytes and not number of characters.

Example

my_length_task [type="length" input="xyz"]

Given the input string “xyz”, the task will return 3, length of the string.

Stay updated on the latest Chainlink news