- Reference >
- Operators >
- Aggregation Pipeline Operators >
- String Aggregation Operators
String Aggregation Operators¶
String expressions, with the exception of
$concat
, only have a well-defined behavior for strings of ASCII characters.
$concat
behavior is well-defined regardless of the
characters used.
Note
For details on specific operator, including syntax and examples, click on the specific operator to go to its reference page.
Name | Description |
---|---|
$concat |
Concatenates any number of strings. |
$substr |
Returns a substring of a string, starting at a specified index position up to a specified length. Accepts three expressions as arguments: the first argument must resolve to a string, and the second and third arguments must resolve to integers. |
$toLower |
Converts a string to lowercase. Accepts a single argument expression. |
$toUpper |
Converts a string to uppercase. Accepts a single argument expression. |
$strcasecmp |
Performs case-insensitive string comparison and returns: 0 if two
strings are equivalent, 1 if the first string is greater than the
second, and -1 if the first string is less than the second. |