Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Trim

Index

Properties

Properties

$trim: { input: StringExpression<string>; chars?: StringExpression<string> }

Removes whitespace or the specified characters from the beginning and end of a string.

version

4.0

see

https://docs.mongodb.com/manual/reference/operator/aggregation/trim/#mongodb-expression-exp.-trim

Type declaration

  • input: StringExpression<string>

    The string to trim. The argument can be any valid expression that resolves to a string. For more information on expressions, see Expressions.

  • Optional chars?: StringExpression<string>

    The character(s) to trim from the beginning of the input.

    The argument can be any valid expression that resolves to a string. The $trim operator breaks down the string into individual UTF code point to trim from input.

    If unspecified, $trim removes whitespace characters, including the null character. For the list of whitespace characters, see Whitespace Characters.

Generated using TypeDoc