Oihana PHP Arango

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(int $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)
Parameters
$codepoint : int

Unicode codepoint to convert to character.

Tags
example
use function oihana\arango\db\functions\strings\toChar;

$expr = toChar(65);
// Produces: 'TO_CHAR(65)'
see
https://docs.arangodb.com/3.12/aql/functions/string/#to_char
since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results