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