toChar.php
Table of Contents
Functions
- toChar() : string
- Return the character with the specified Unicode codepoint.
Functions
toChar()
Return the character with the specified Unicode codepoint.
toChar(string|int|float $codepoint) : string
This helper wraps the ArangoDB AQL function TO_CHAR(codepoint) which returns
the character corresponding to the given Unicode codepoint. This is useful for
generating special characters or converting numeric codes to characters.
Example AQL usage:
TO_CHAR(65) // returns "A"
TO_CHAR(97) // returns "a"
TO_CHAR(8364) // returns "€" (Euro symbol)
TO_CHAR(32) // returns " " (space)
The codepoint may be a literal number or any AQL expression producing one — a document attribute, most often — so the helper serves both a fixed character and a per-document one:
Parameters
- $codepoint : string|int|float
-
Unicode codepoint to convert to character, or an AQL expression producing one.
Tags
Return values
string —The formatted AQL expression.