charLength.php
Table of Contents
Functions
- charLength() : string
- Return the number of characters in a string (not byte length).
Functions
charLength()
Return the number of characters in a string (not byte length).
charLength(string $expression) : string
This helper wraps the ArangoDB AQL function CHAR_LENGTH(str) which returns
the number of characters in a string, counting Unicode characters properly
rather than bytes.
Example AQL usage:
CHAR_LENGTH("hello") // returns 5
CHAR_LENGTH("café") // returns 4 (not 5 bytes)
CHAR_LENGTH(doc.title) // returns character count of title
Parameters
- $expression : string
-
String expression to count characters of.
Tags
Return values
string —The formatted AQL expression.