left.php
Table of Contents
Functions
- left() : string
- Return the leftmost characters of a string.
Functions
left()
Return the leftmost characters of a string.
left(string $value, int $length) : string
This helper wraps the ArangoDB AQL function LEFT(value, length) which returns
the specified number of characters from the left (beginning) of the string.
Example AQL usage:
LEFT("hello world", 5) // returns "hello"
LEFT("hello world", 0) // returns ""
LEFT("hello world", 20) // returns "hello world" (entire string)
LEFT(doc.title, 10) // returns first 10 characters of title
Parameters
- $value : string
-
String expression to extract characters from.
- $length : int
-
Number of characters to return from the left.
Tags
Return values
string —The formatted AQL expression.