ltrim.php
Table of Contents
Functions
- ltrim() : string
- Remove whitespace from the start of a string.
Functions
ltrim()
Remove whitespace from the start of a string.
ltrim(string $value[, string|null $chars = null ]) : string
This helper wraps the ArangoDB AQL function LTRIM(value, chars) which removes
whitespace characters from the beginning (left side) of a string. You can specify
custom characters to remove instead of the default whitespace.
Example AQL usage:
LTRIM(" hello world ") // returns "hello world "
LTRIM("***hello***", "*") // returns "hello***"
LTRIM(" hello") // returns "hello"
LTRIM(doc.title) // removes leading whitespace from title
Parameters
- $value : string
-
String expression to trim from the left.
- $chars : string|null = null
-
Optional characters to remove (defaults to whitespace).
Tags
Return values
string —The formatted AQL expression.