This is the ThingsDB documentation for version v0, click here for the latest version!

is_utf8

This function determines whether the provided value is of type str and contains valid UTF-8 characters.

This function does not generate an event.

Function

is_utf8(value)

Arguments

Argument Type Description
value any (required) The value to be tested.

Return value

Returns true if the given value is of type raw and contains valid utf8, else false.

Example

This code shows some return values for is_utf8():

[
    is_utf8( 'ԉ' ),
    is_utf8( 'pi' ),
];

Return value in JSON format

[
    true,
    true
]