RTrim

Not available in this language yet.
RTrim( value )
RTrim( value )
RTrim( value )
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
RTrim( value )

Description

The RTrim function removes all trailing white spaces, tabs, and new lines from the end of a string.

Parameters

Argument Type Definition and Requirements

value

String

The string having the trailing white spaces, tabs, and new lines removed.

Returns

A string value which has all the trailing white spaces, tabs, and new lines removed.

Examples

The query below executes an array of independent RTrim operations and returns the results in an array. The result array position matches the execution array position. The first operation takes the string "Fire " and removes the trailing space in the string. The resultant object "Fire" is placed in the top position of the result array. The second operation uses the string "Fire\n\n\t\t " containing embedded tabs, new lines, and spaces at the end of the string. The new string with the trailing characters removed is placed in the second position of the result array.

System.out.println(
  client.query(
    Arr(
       RTrim("Fire    "),
       RTrim("Fire\n\n\t\t  ")
    )
  ).get());
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
["Fire", "Fire"]

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!