Cypher rTrim Function

rTrim() returns the original string with leading whitespace removed.

Syntax: rTrim(original)

Returns: A String.

Arguments

NameDescription
originalAn expression that returns a string.

Example

RETURN rTrim(" Hello, World! ")

The value returned will be a string that will be similar to the original string except all the trailing whitespace would have been removed. Hence the returned string will be ” Hello, World!”.

Considerations

  • rTrim(null) returns null.

Example

RETURN rTrim(" Cypher Tutorials!")

Returns the following Result

rTrim(" Cypher Tutorials!")
" Cypher Tutorials!"

Example

RETURN rTrim("Cypher Tutorials! ")

Returns the following Result

rTrim("Cypher Tutorials! ")
"Cypher Tutorials!"

Example

RETURN rTrim(" Cypher Tutorials! ")

Returns the following Result

rTrim(" Cypher Tutorials! ")
" Cypher Tutorials!"

Example

RETURN rTrim("Cypher Tutorials!")

Returns the following Result

rTrim("Cypher Tutorials!")
"Cypher Tutorials!"

Example

RETURN rTrim(null)

Returns the following Result

rTrim(null)
null

NoterTrim(null) returns null.

Learn More