Skip to main content

blob.readstring(numberOfBytes)

Reads data from a blob into a new string

Availability

Device + Agent

Parameters

Name Type Description
numberOfBytes Integer The number of bytes to read

Returns

String

Description

This method reads the specified number of bytes from the blob and returns them as a new string.

The new string’s bytes are taken from the current read/write pointer onwards. The pointer can be determined using the tell() method and set using the seek() method.

Only those bytes up to the end the source blob are read; if the call asks for 256 bytes but the read/write pointer is 128 bytes from the end, the new string will be 128 characters long.

Example Code