apoc.text.byteCount

Details

Syntax

apoc.text.byteCount(text [, charset ])

Description

Returns the size of the given STRING in bytes.

Arguments

Name

Type

Description

text

STRING

The string to get the size of in bytes.

charset

STRING

The name of a supported charset. The default is: UTF-8.

Returns

INTEGER

Usage Examples

RETURN apoc.text.byteCount("Neo4j") AS output;
Results
output

5

RETURN apoc.text.byteCount("Jesús") AS output;
Results
output

6